Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I’m struggling to get timeit working correctly but this is faster in my limited tests: l = [123456789, 23456789012, 34567890123] result = [0, 0, 0] for idx, row in enumerate(l): i = f"{r...
Answer
#1: Initial revision
I’m struggling to get `timeit` working correctly but this is faster in my limited tests: ```python l = [123456789, 23456789012, 34567890123] result = [0, 0, 0] for idx, row in enumerate(l): i = f"{row:011}" result[idx] = f"{i[:2]}-{i[2:4]}-{i[4:5]}-{i[5:8]}-{i[8:]}" print(result) ```