How to tell if string starts with a number with Python?
Python's string
library has isdigit()
method:
string[0].isdigit()
>>> string = '1abc'
>>> string[0].isdigit()
True
Python's string
library has isdigit()
method:
string[0].isdigit()
>>> string = '1abc'
>>> string[0].isdigit()
True