# User's password without echoing
import maskpass # to hide the password
# masking the password, without using the mask key, the default masking is "*"
pwd = maskpass.askpass("password: " ,mask="")
if (pwd == 'nick'):
print('Welcome')
else:
print("Incorrect password")
# Echoing password and masked with hashtag(#)
import maskpass # importing maskpass library
# prompt msg = Password and
# masking password with hashtag(#)
pwd = maskpass.askpass(prompt="Password:", mask="#")
print(pwd)
# Type password without left CTRL press key
import maskpass # importing maskpass library
# masking the password
pwd = maskpass.advpass()
print('Password : ', pwd)
# importing maskpass library
import maskpass
# PRESSING LEFT CTRL ON KEYBOARD WILL REVEAL THE PASSWORD
# masking the password
pwd = maskpass.advpass()
print('Password : ', pwd)