Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python password generator

import random

lower = "abcdefghijklmnopqrstuvwxyz"
upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
numbers = "0123456789"
symbols = "@#$&_-()=%*:/!?+."


string = lower + upper + numbers + symbols
length = int(input("How Many Characters Do You Want Your Password To Be: "))
password = "".join(random.sample(string, length))

print("Here Is Your Password:", password)
Comment

python generate random strong password

import random, string
def generate_password(length: int=4)-> str:
    # add lower case chars
    lower  = [random.choice(string.ascii_lowercase) for i in range(length)]
    # add digit chars
    digit  = [random.choice(string.digits) for i in range(length)]
    # add upper case chars
    upper  = [random.choice(string.ascii_uppercase) for i in range(length)]
    # add symbols
    symbol = [random.choice(["!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "-", "+", "=", ".", ",", "?"]) for i in range(length)]
    # store random generated lists to a variable
    original = lower+digit+upper+symbol
    # shuffle stored data in place
    random.shuffle(original)
    return ''.join(original)
Comment

how to make password creator using python

from numpy import array
import random
import string

print("This is a password creator")

print("type 1 for only number password or type 2 for alphabet password or type 0 for mixed password")
y = int(input("enter"))
print("type how many digits of password you want")
x = int(input("enter"))
if y==1:
    print("ok you choosed password in number")
    for i in range(0,x):
        k = random.randint(0,9)
        print(k,end="")
        
elif y == 2:
    print("ok you choosed alphabet password")
    n = 1
    for i in range(x):
        randomLowerLetter = chr(random.randint(ord('a'), ord('z')))
        randomUpperLetter = chr(random.randint(ord('A'), ord('Z')))
       
        
        if n%2==0:
            print(randomLowerLetter,end="")
        elif n%2!=0:
            print(randomUpperLetter,end="")
        n= n + 1

elif y == 0:
    print("ok you choosed mixed password of alphabet and numbers")
    n=1
    letter = 0
    for i in range(x):
        
        randomLowerLetter = chr(random.randint(ord('a'), ord('z')))
        randomUpperLetter = chr(random.randint(ord('A'), ord('Z')))
        k = random.randint(0,9)
        if n%2==0:
            print(randomLowerLetter,end="")
            if letter +1 != x:
                print(k,end="")
                letter+=2
            else:
                letter+=1
                
        elif n%2!=0:
            print(randomUpperLetter,end="")
            letter+=1
        n=n+k
    
        if letter >= x:
            
            break
        
        

else:
    print("read carefully")
print()
print("thanks")
Comment

password generator in python

import random

print("
")
def greeting():
    print("PASSWORD GENERATOR
")
greeting()

def passwordgen():
    print("
")
    
lower_case="abcdefghijklmnopqrstuvwxyz"
upper_case="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
number="0123456789"
symbols="!@#$%^&*()_+:"
jap="あいうえおかきくけこさしすせそなにぬねのたちつてとはひふへほまみむめもらりるれろやゆよ"


Use_for=lower_case+upper_case+number+symbols+jap 
length_for_password=10

password="".join(random.sample(Use_for, length_for_password))

print("Your generated password is "+password)

passwordgen()

Comment

password generator in python

import random

strong_keys = ["@","#","$","£","π","¥","&","3","¢","3","*","?","!","%","/","G","A","B","F","W","F","H","6","9",":","^","=","|","~","∆"]

def password():
	try:
		n = int(input('your password contain(type in number) : '))
	except:
		print('Rerun the program and type in number please')

	ans = ""
	for i in range(n):
		rand = random.choice(strong_keys)
		if i == 0:
			ans = rand
		else:
			ans += rand
		
	print('

your password: '+ans+'

')
	user = input('if you dont like this?
Type "r" else "q" : ')
	if user.lower() == 'r':
		password()
	else:
		quit()
	
password()
Comment

pythob password generator

import string
import random

chars = list(string.ascii_letters + string.digits)
lenght = int(input("Lenght: "))
password = []
random.shuffle(chars)
for i in range(lenght):
    random.shuffle(chars)
    password.append(random.choice(chars))
    
print("".join(password))
Comment

python password generator

import random

lower_case = "abcdefghijklmnopqrstuvwxyz"
upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
numbers = "0123456789"
symbols = "!#$%&()*+,-./:;<=>?@[]^_`{|}~"

allChars = lower_case + upper_case + numbers + symbols

length = 10
password = "".join(random.sample(allChars, length))
print(password)
Comment

password generator python

from random import randint

def create_random_chars(nbr_of_chars):
    return "".join(chr(randint(33,126)) for i in range(nbr_of_chars))


print(create_random_chars(10))
# I1CU>E5q;$
Comment

password generator python

import random

name = input('What is your name? (It will be used in the password) ')

sletters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
bletters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
others = ['`', '~', '!', '@', '#', '$', '%', '^', '&', '*']

rs = random.choice(sletters)
rs2 = random.choice(sletters)
rb = random.choice(bletters)
rb2 = random.choice(bletters)
rn = random.choice(numbers)
rn2 = random.choice(numbers)
ro = random.choice(others)
ro2 = random.choice(others)

password = name + rs + rb + rs2 + rn + ro + rn2 + rb2 + ro2

print(password)
Comment

python password generator

from random import randint
import pyperclip

allSymbols = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '- ', '=', '`', '~', '!', '@', '#', '$', '%', '^', '&', '*', ' (', ' )', ' ¹', '²', '³', '⁴', '⁵', '⁶', '⁷', '⁸', '⁹', '⁰', '¡', '¤', '€', '¼', '½', ' ¾', '‘', '’', 'æ', '©', '®', 'þ', '«', '»', '"', "'", 'ß', '§', 'ð', 'œ', 'Æ', 'Œ', 'ø', '¶', 'Ø', '°', '¿', '£', '‘¥', '÷', '×', '/', '?' ]

password = ' '
lenSymbols = len(allSymbols)
recycleMe = int(input("how much characters do you want your password to be?     "))

for i in range(recycleMe):
    password = password + allSymbols[randint(0, lenSymbols)]
print(password)
#pyperclip.copy(password)
#print("copied to clipboard")
Comment

PREVIOUS NEXT
Code Example
Python :: flask get value of radio button 
Python :: addition in python 
Python :: python 2 decimal places format 
Python :: Python program to get the file size of a plain file. 
Python :: pandas dataframe delete column 
Python :: python string to list with separator 
Python :: own labels for ticks matplotlib 
Python :: python list to bytes 
Python :: pyspark join 
Python :: matplotlib secondary y axis 
Python :: convert excel file to csv with pandas 
Python :: malier module python 
Python :: TypeError: exceptions must derive from BaseException 
Python :: python download youtube video 
Python :: pandas column by index 
Python :: make linked list in python 
Python :: pyqt5 image 
Python :: figsize param in pandas plot 
Python :: check if date is valid python 
Python :: how to use inverse trigonometric functions in python 
Python :: pytesseract.image_to_string save text file 
Python :: pyserial example code 
Python :: round up division python 
Python :: width and height of pil image 
Python :: python get first n elements of dict 
Python :: how to reset index after dropping rows pandas 
Python :: shutil move file 
Python :: python find in largest 3 numbers in an array 
Python :: django createmany 
Python :: unicodedecodeerror file read 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =