主页
Python
Python String isnumeric() 方法
demo_ref_string_isnumeric2
运行 ❯
×
更改方向
保存代码
更改主题
a = "\u0030" #unicode for 0 b = "\u00B2" #unicode for ² c = "10km2" print(a.isnumeric()) print(b.isnumeric()) print(c.isnumeric())
True
True
False