Generate Password using Python

Learn how to create a random password generator in Python.


एक weak password होना किसी system या account के लिए अच्छा नहीं है। इसलिए हमे एक मजबूत पासवर्ड की जरुरत पड़ती है। आज के article मे हम numbers, alphabets और अन्य symbols के mixture से एक random strong password बनाना सीखेंगे।

Source Code : 

import random

lower_case = "abcdefghijklmnopqrstuvwxyz"
upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
numbers = "0123456789"
symbols = "[]{}./#@$"

all = lower_case + upper_case + numbers + symbols

length = 10

password = "" .join(random.sample (all,length))

print ("password : " password)

OutPut : 
password : /bo$WO8{Bx


  1. Program : Google Search Using Python
  2. Python : WAP to do arithmetical operations
  3. Python : WAP to Print Check Leap Year
  4. Python : WAP to print factorial of any number
  5. Python : WAP to check Armstrong number
  6. Python : WAP to to Print the Fibonacci sequence