Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to know if a input is a interger in python

inp = input('somrthing: ')

if inp.isnumeric():
    print('THat was a integer.')
else:
    print('That was not a integer.')
 
PREVIOUS NEXT
Tagged: #input #interger #python
ADD COMMENT
Topic
Name
5+3 =