-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrapped everything in a main function
- Loading branch information
1 parent
2ed5292
commit 9f54ab1
Showing
3 changed files
with
91 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import random | ||
import string | ||
|
||
# stringexample = 'abcdef' | ||
# print(random.choice(string) + str(random.randint(1000,9999)) + random.choice(string)*2) | ||
|
||
def random_string(length=8): | ||
char_set = string.ascii_letters | ||
return str(random.randint(1000,9999)) + ''.join(random.choice(char_set)for _ in range(length)/2) | ||
|
||
password = random_string() | ||
print(password) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
while password != passcode or username != name: | ||
# pass | ||
else: | ||
# print('Option is not available\n') | ||
# repeat = True |