1import string
2from random import *
3characters = string.ascii_letters + string.punctuation + string.digits
4password = "".join(choice(characters) for x in range(randint(8, 16)))
5print password
6
1import random
2chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@£$%^&*().,?0123456789'
3
4number = input('Please enter a number of passwords.')
5try:
6 number = int(number)
7except:
8 print("Error, please enter a number!")
9
10length = input('Length of password?')
11try:
12 length = int(length)
13except:
14 print("Error, please enter a number!")
15
16print('\nHere are your password(s):')
17
18for pwd in range(number):
19 password = ''
20 for c in range(length):
21 password += random.choice(chars)
22 print(password)
1import random
2
3alph = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ\
4 abcdefghijklmnopqrstuvwxyz\
5 1234567890 !@#$%^&*(){}[]<>,.')
6out = ''
7for char in string:
8 out += random.choice(alph)
9
10print(out)
1#This is giving you a password with 8 strings and 4 numbers:
2import random
3i=0
4list=[]
5while i < 12:
6 while i < 8:
7 list.append(random.choice(string.ascii_letters))
8 i+=1
9 while i < 12:
10 list.append(random.randint(0, 9))
11 i+=1
12
13list=' '.join([str(elem) for elem in list])
14print("Your new password: ", list.replace(" ", ""))
1import random
2import string
3
4x = str(input("Do you want a password? y/n "))
5
6list = []
7if x == "y":
8 print("Alright!")
9 for i in range(16):
10 _1 = random.choice(string.ascii_letters)
11 _2 = random.randint(1, 9)
12 list.append(_1)
13 list.append(_2)
14else:
15 print("ok")
16
17
18def convert(list):
19
20 s = [str(i) for i in list]
21
22 res = "".join(s)
23
24 return(print(res))
25
26
27
28convert(list)
29
30
1#Simple Way To Make Password Generator
2#NickSiteCoder
3import random
4
5characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@€$#%({)}],/<\.>[*^&"
6
7while 1:
8 length = int(input("What length would you like your password to be ? :"))
9 count = int(input("How many passwords would you like ? "))
10 for x in range(0, count):
11 password = ""
12 for x in range(0,password_len):
13 password_characters = random.choice(characters)
14 password = password + password_characters
15 print("Here is your password : ",password)