You can find it by str.isdigit (). Decimal values are also False.
"100".isdigit()
#->True
"0.1".isdigit()
#->False
"1a".isdigit()
#->False
"ddd".isdigit()
#->False
"O".isdigit()
#->False
"!".isdigit()
#->False
"one".isdigit()
#->False
Recommended Posts