Reputation: 3
I have a code that print random alpha numeric password. But only one. I aim to print a 1000 line of passwords.
The function is :
get_random_alpahanumeric_string(letters_count,digits_count)
I tried this but in vain:
String_to_iterate = get_random_alpahanumeric_string(letters_count,digits_count)
for s in range(1,10000):
if i >= s:
s == i
break
i += 1
print(String_to_iterate)
Please any help.
Upvotes: -2
Views: 103
Reputation: 54148
To print a thousand random passwords, you need to call the method a thousands time
For that, put the call inside the loop:
for i in range(1000):
string_to_iterate = get_random_alpahanumeric_string(letters_count,digits_count)
print(string_to_iterate)
Upvotes: 0
Reputation: 780655
Call the function in the loop.
for _ in range(1000):
print(get_random_alpahanumeric_string(letters_count,digits_count))
Upvotes: 0