+ 1
How to take an input while writing a code?
how to save the value and use it in a condition
1 Answer
+ 7
Use input function. but remember it always returns string.
var1 = input("Enter some string : ")
If you want to get integer wrap it in int()
var2 = int(input("Enter some integer"))
And use float() for getting floats and so on...