s1 = "12223".isdigit()
print(s1)
s2 = "12223a".isdigit()
print(s2)
#结果如下:
#True
#False
如何检测字符串中只含有数字?
猜你喜欢
转载自blog.csdn.net/Da___Vinci/article/details/92805370
今日推荐
周排行