0

How to do for asking the user to enter a variable and print it in PYTHON ?

https://code.sololearn.com/cXVk2l4rCnos/?ref=app

4th Dec 2018, 8:17 PM
abderrahmane
3 Answers
0
xyz = input("Please input something:") print(xyz)
4th Dec 2018, 9:03 PM
deha
deha - avatar
+ 1
Something to consider.. input in python is by default a string. So if the input is a number, it will be "5" and not 5 .. 5 is not equal to "5" ... If you want to do take in a number, you can wrap the input. xyz = int(input("Please enter number:") print(xyz)
5th Dec 2018, 12:32 AM
LordHill
LordHill - avatar
0
Thank you very much
4th Dec 2018, 9:04 PM
abderrahmane