Horje
python isdigit negative Code Example
a.isdigit(): for negatives
>>>'-6'.lstrip('-')
'6'
>>>'-6'.lstrip('-').isdigit()
True
python isdigit negative
def is_digit(n):
    try:
        int(n)
        return True
    except ValueError:
        return  False

if is_digit(question):
   ....




Python

Related
pandas chesk if object is string or tuple Code Example pandas chesk if object is string or tuple Code Example
python packing circles Code Example python packing circles Code Example
python filter dictionary Code Example python filter dictionary Code Example
python display map Code Example python display map Code Example
install pyimagesearch python3 Code Example install pyimagesearch python3 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
6