Is there any way to tell whether a string represents an integer (e.g., '3', '-17' but not '3.14' or 'asfasfas') Without using a try/except mechanism?
'3'
'-17'
'3.14'
'asfasfas'
is_int('3.14') == False is_int('-7') == True
← Назад к списку