+ 1
inputs
How can I take 3 inputs at the same time
3 Answers
+ 2
Yes absolutely you can, just define a method which takes input and use it 3 continuously, it will work for you
+ 1
Not entirely clear for me, what you mean. But if you are looking for an input with 3 values in a single input() turn, you can do like this:
# input is splitted by ',', and each separated item is mapped as integer:
var1, var2, var3 = map(int, input('enter 3 numbers sep. by comma: ').split(','))
print(var1, var2, var3)
# this is working similarly but using a list for storing the 3 inputs:
inp = [int(i) for i in input('enter 3 numbers sep. by comma: ').split(',')]
print(*[j for j in inp])