Think about the last time you were solving a problem! Did you have more than 1 approach to solve it?
Don’t know about life, but Python has a great module to help you decide the better(fastest) way to solve a problem.
Let me introduce you to the timeit module. You can use it directly on your commandline or any Python IDLE.
On the commandline
python3 -m timeit '"-".join(char for char in "Pylenin")' >>> 1000000 loops, best of 3: 0.851 usec per loop
On a Python IDLE
>>> import timeit >>> timeit.timeit('"-".join(str(n) for n in range(100))', number=10000) 0.8187260627746582
Read about this topic in more details in this blog.