Python - User Input

User Input :

Python allows for user input.

That means we are able to ask the user for input.

The method is a bit different in Python 3.6 than Python 2.7.

Python 3.6 uses the input() method.

Python 2.7 uses the raw_input() method.

The following example asks for the username, and when you entered the username, it gets printed on the screen:

Python 3.6 :

username = input("Enter username:")
print("Username is: " + username)


Enter username:

Python 2.7 :

username = raw_input("Enter username:")
print("Username is: " + username)


Enter username:

Its all about the difference how we are asking users for the input in different versions of the python.


Python - RegEx SETS

posted on 2019-11-12 23:06:24 - Python Tutorials


Python - RegEx_Functions

posted on 2019-11-09 06:07:29 - Python Tutorials


Python - RegEx_Sets

posted on 2019-11-09 05:30:54 - Python Tutorials

Prompt Examples

ChatGPT Prompt Examples

posted on 2023-06-21 22:37:19 - ChatGPT Tutorials

Use Cases

Chat GPT Key Use Cases

posted on 2023-06-21 21:03:17 - ChatGPT Tutorials

Prompt Frameworks

Prompt Frameworks

posted on 2023-06-21 19:33:06 - ChatGPT Tutorials