Hey guys, I have a problem and I'm really confused of how to do it. Anyone know this?
Problem: print 100 random strings(all lowercase letters), each increasing 10 characters in each loop. Start with 10 characters.
Eg:
xcdsfertdf
iuperdfghjufgqwersyt
tyuierdfhsjgkpoudfghrtdgckdvcn
.
.
.
.
.
100th loop
Can anyone help please??
I tried the code but failed to increment the string each time:
Problem: print 100 random strings(all lowercase letters), each increasing 10 characters in each loop. Start with 10 characters.
Eg:
xcdsfertdf
iuperdfghjufgqwersyt
tyuierdfhsjgkpoudfghrtdgckdvcn
.
.
.
.
.
100th loop
Can anyone help please??
I tried the code but failed to increment the string each time:
import random import string def random_word(): random_words = ''.join(random.choice(string.ascii_lowercase)for i in range(10)) while 0 > len(random_words) return(random_words) for i in range(100): print(random_word())