This is somewhat of a simple question and I hate to ask it here, but I can\'t seem the find the answer anywhere else: is it possible to get multiple values from the user in
if we want to two inputs in a single line so, the code is are as follows enter code here
x,y=input().split(" ")
print(x,y)
after giving value as input we have to give spaces between them because of split(" ") function or method.
but these values are of string type if to perform some arithmetic operations we have to convert the type of x,y are as follows int(x),int(y)
we can do this also with the help of list in python.enter code here
list1=list(map(int,input().split()))
print(list1)
this list gives the elements in int type