console input python code example

Example 1: input command in python shell

x = input("Input Your Name")
#lets say I input Bob
print(x)
#It should output Bob

Example 2: python how to use input

#basic user handling for begginers

x = input("your question here") # when someone types something here that answer will be saved and be used for later

# for example 
print(x)

Example 3: inpuit inf terfminal ppython

userInput = input("This is a prompt for the input")

print userInput

Example 4: python text ouput to console

#in python 2.7
print "Hello world"
#in python 3.7
print("Hello again world")

#Neither of these require any imports.