Two ways to write the same thing and you want to know which is faster. Do not use a stopwatch.
python3 -m timeit "sum(range(1000))"
python3 -m timeit -s "data = list(range(1000))" "sorted(data)"
-s holds setup code that is not timed. Python picks the number of loops itself and reports the best of several runs. Treat tiny differences as noise, and remember a snippet is not your whole program.
Further reading: timeit documentation