+ 1
I don't understand how to use the input function
5 ответов
+ 5
You can use input like this :
a=input("Enter any value : ")
You can also define the type of input u want
For eg : str or int or float
Eg :
String input
a=str(input())
No. Input
a=int(input())
Thanks
+ 2
I guess you want to use it in python.
input() takes user input and returns a string. It has one argument, it will print it on the screen next to the input request.
To get an integer input, use int(input())
+ 2
Thanks guys
0
input() is a builtin function, that prints it's argument and returns the characters user typed as a string.
I expect you to ask that because you only did not get input work correctly on SoloLearn.
In SoloLearn input() does not print anything.
in.
SoloLearn playgrounds ask the input only once per execution, where line separated inputs are divided to the existing input statements.