Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

como saber si un string es un numero python

def if_integer(string):
  
    if string[0] == ('-', '+'):
        return string[1:].isdigit()

    else:
        return string.isdigit()
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #como #saber #si #string #es #numero #python
ADD COMMENT
Topic
Name
6+9 =