对象.isdigit() ,只能判断全是数字的字符串

s = "55p""

print(s.isdigit())    # False

 

s2 = "5568"

print(s2.isdigit())    # True

posted @ 2018-11-03 11:29  Jack的逆旅  阅读(290)  评论(0编辑  收藏  举报