I have googled on how to write a fixed length loop in Python but haven't found anything, so I ask here:
for i in range(0, 25):
index = int(random.uniform(0, len(characters)))
code += characters[index]
return code
As you see I don't need i
. How can I rewrite this to be a fixed length loop where I don't have to define i
?