Python Compiler
str1 = "python" str2 = "123" str3 = "\u0031" # unicode for 1 str4 = "\u00B2" #unicode for ² print(str1.isdigit()) # False print(str2.isdigit()) # True print(str3.isdigit()) # True print(str4.isdigit()) # True
OUTPUT
False
True
True
True
×

Save as Private