How to take input from user in python?

Python allows for user input.

  • Python 3.6 uses the input() method.
  • Python 2.7 uses the raw_input() method.
  • username = input("Enter user name:")
    print("User name is: " + username)

    Example

    username = raw_input("Enter user name:")
    print("User name is: " + username)





    Previous Next


    Trending Tutorials




    Review & Rating

    0.0 / 5

    0 Review

    5
    (0)

    4
    (0)

    3
    (0)

    2
    (0)

    1
    (0)

    Write Review Here