Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

validity of password in python

# Python program to check validation of password
# Module of regular expression is used with search()
import re
password = "R@m@_f0rtu9e$"
flag = 0
while True:  
    if (len(password)<8):
        flag = -1
        break
    elif not re.search("[a-z]", password):
        flag = -1
        break
    elif not re.search("[A-Z]", password):
        flag = -1
        break
    elif not re.search("[0-9]", password):
        flag = -1
        break
    elif not re.search("[_@$]", password):
        flag = -1
        break
    elif re.search("s", password):
        flag = -1
        break
    else:
        flag = 0
        print("Valid Password")
        break
  
if flag ==-1:
    print("Not a Valid Password")
Comment

PREVIOUS NEXT
Code Example
Python :: directory path with python argparse 
Python :: how to cerate a bar chart seaborn 
Python :: merge subplot matplotlib 
Python :: python sort array of dictionary by value 
Python :: run code in python atom 
Python :: python create directory if non existent 
Python :: django install 
Python :: circular list python 
Python :: discord.py mention user 
Python :: pythob password generator 
Python :: how do i limit decimals to only two decimals in python 
Python :: How to efficiently calculate the nth Catalan number, in Python? 
Python :: how to map longitude and latitude in python 
Python :: how to remove the last letter of a string python 
Python :: changing the port of django port 
Python :: how to get dictionary input from user in python 
Python :: print flush python 
Python :: python print with 2 decimals 
Python :: procfile for django heroku 
Python :: check regex in python 
Python :: how to make an empty variable in python 
Python :: minmaxscaler python 
Python :: django slug int url mapping 
Python :: pyqt5 qtreewidgetitem enable drop drag 
Python :: MAKE A SPHERE IN PYTHON 
Python :: is python good for web development 
Python :: how to create adjacency matrix from adjacency list in python 
Python :: write a file python 
Python :: dataframe to ftp 
Python :: double char python 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =