+ 1

how to input different data types numbers in one line in python?

19th Apr 2018, 1:45 PM
Tincture
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
19th Apr 2018, 4:53 PM
Paul
Paul - avatar
0
what do you mean? input as list?
19th Apr 2018, 2:22 PM
Markus Kaleton
Markus Kaleton - avatar