首页 > 技术文章 > 第四章后总结文档

hantongxue 2020-03-26 14:14 原文

1. isdigit()用法
检测字符串是否只由数字组成
a = '11111122222'
print(a.isdigit())

返回结果:

True

 

 

推荐阅读