About Lesson
isdigit():-
The isdigit() method returns True if all the characters are digits, otherwise False. Exponents, like ², are also considered to be a digit.
Syntax:- string.isdigit()
txt = “50800” x = txt.isdigit() print(x) Output True |
a = “u0030” #unicode for 0 b = “u00B2” #unicode for ² print(a.isdigit()) print(b.isdigit()) Output True True |