+ 1

How take a input only as integer in python?

input("integer")

15th Mar 2018, 6:26 AM
Avis Lowha
Avis Lowha - avatar
4 Answers
+ 5
try: a=int(input()) print(a) except: print("sorry sweetie, integers only")
15th Mar 2018, 8:49 AM
Ahri Fox
Ahri Fox - avatar
+ 1
a = int(input()) print(a) print(type(a))
15th Mar 2018, 6:33 AM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar
0
doesn't wot
15th Mar 2018, 6:35 AM
Avis Lowha
Avis Lowha - avatar
0
please check now
15th Mar 2018, 6:40 AM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar