samedi 25 novembre 2017

Python:For loop only works once in python

I don't know why but it doesn't work.The for loop only works once and that's it

import string
import random
print ('Insert your words,m8')
letters = string.ascii_letters
words = input()
max_number = random.randint(6,10)
for i in range(0,max_number):
    randy = random.randint(0,25)
    title = letters[randy]
open(str(title),'w+').write(words)




Aucun commentaire:

Enregistrer un commentaire