[Solved] My Python for loop executes 5005 times but it is meant to execute 100 times [closed]
Let’s simplify your program to understand how to get 5005 results: gencodelist = [] for i in range(1, 100): gencodelist.append(str(i) + ‘ ‘) gencodeout=””.join(gencodelist) print(gencodeout) Here we are adding elements to the list gencodelist 99 times (from 1 to 99), and print all elements of this list each time. So, we have 1 + 2 … Read more