+ 1
how to input different data types numbers in one line in python?
2 Answers
+ 4
It could be like this:
a, b, c = input().split(" ")
a = int(a)
b = str(b)
c = float(c)
print(a, type(a))
print(b, type(b))
print(c, type(c))
# example input: 3 word 6.7
0
what do you mean? input as list?