SyntaxFix
Write A Post
Hire A Developer
Questions
You could use regular expressions.
You can detect digits using:
if(re.search([0-9], yourstring[:1])): #do something
The [0-9] par matches any digit, and yourstring[:1] matches the first character of your string