input command 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: python input

# The function 'input()' asks the user for input
myName = input()

Example 4: input python

name = input("Enter your name: ")

#Printing the variable (name)
print("hello",name)

Example 5: input code for python

# Python 2

txt = raw_input("Type something to test this out: ")
print "Is this what you just said?", txt