SyntaxFix
Write A Post
Hire A Developer
Questions
Use str.isdigit:
str.isdigit
>>> "12345".isdigit() True >>> "12345a".isdigit() False >>>