Learning Python

14. User Input

  • Python 3.6 uses the input() method.
  • Python 2.7 uses the raw_input() method
def main():
    username = input("Enter username:")
    print("Username is: " + username)

Python stops executing when it comes to the input() function, and continues when the user has given some input.