User input in python

User input in python

There are many ways to get input from the user in Python. The most common way is to use the input() function.

The input() function will prompt the user for input, and then return the value that the user enters. For example:

name = input("What is your name? ")

print("Hello, " + name)

This code will prompt the user for their name, and then print out a greeting with their name.

Leave a Reply