Answers for "get input from user in python"

0

python 2.7 get user input

# Python 2

txt = raw_input("Type something to test this out: ")
print "Is this what you just said?", txt
Posted by: Guest on December-18-2019
0

python getting input from

# Python 3

txt = input("Type something to test this out: ")

# Note that in version 3, the print() function
# requires the use of parenthesis.
print("Is this what you just said? ", txt)
Posted by: Guest on April-23-2020
0

get input from user in python

string = input("Enter a string: ")
number = int(input("Enter a number: "))
Posted by: Guest on August-25-2021

Python Answers by Framework

Browse Popular Code Answers by Language