Use getpass module
# ! / Usr / bin / Python the env Import getpass username = the raw_input ( " username: " ) password = getpass.getpass ( " password: " ) # The first getpass is the module, the second module which is a function of getpass if == username ' Bob ' and password == ' 123456 ' : Print ' the Login successful ' the else : Print ' the Login here Incorrect '