Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python password with special characters

special_chars =  ['$', '&', '!']

password = input("Provide your password: ")    
invalid = False

for char in password:
    if char not in special_chars:
        print('Invalid char found! Use only: {}'.format(special_chars))
        invalid = True
        break
if not invalid:
    print('Valid password.')
Comment

PREVIOUS NEXT
Code Example
Python :: discord.py reference 
Python :: python append filename to path 
Python :: python factorial 
Python :: run code in python atom 
Python :: what is self in python 
Python :: how to run a python script 
Python :: sum first 100 integers in python 
Python :: django add middleware 
Python :: pandas dataframe column based on another column 
Python :: how to set variable in flask 
Python :: dictionary to list python 
Python :: string to array python 
Python :: python start with 
Python :: python print 2 decimal places 
Python :: how to get the remainder in python 
Python :: mkvirtualenv environment python 3 
Python :: how to sum all the numbers in a list in python 
Python :: max in a list python 
Python :: selenium save webpage as pdf python 
Python :: python read scv 
Python :: Django custome login 
Python :: how to execute a python file from another python file 
Python :: rename in python 
Python :: python check if there is internet connection 
Python :: filter django or 
Python :: how to do a print statement in python 
Python :: Game of Piles Version 2 codechef solution 
Python :: string remove in python 
Python :: how to check substring in python 
Python :: pandas convert first row to header 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =