Difference between revisions of "Python/UserPasswords"

From ProgrammingExamples
Jump to: navigation, search
Line 5: Line 5:
 
username = str(raw_input("Username: "))
 
username = str(raw_input("Username: "))
 
password = getpass.getpass("Password: ") #You will see that the password won't show on your screen
 
password = getpass.getpass("Password: ") #You will see that the password won't show on your screen
 +
  
 
print("Your username is %s and your password is %s" % (username, password))
 
print("Your username is %s and your password is %s" % (username, password))

Revision as of 09:17, 27 June 2010

UserPasswords.py

import getpass
 
username = str(raw_input("Username: "))
password = getpass.getpass("Password: ") #You will see that the password won't show on your screen
 
 
print("Your username is %s and your password is %s" % (username, password))