yuyangncepu 发表于 2018-2-22 16:05:43

while not temp.isdigit():

while not temp.isdigit():

这个是什么意思呀

冬雪雪冬 发表于 2018-2-22 16:09:02

当temp不是数字时运行循环。

ba21 发表于 2018-2-22 18:11:42

>>> temp='123'
>>> temp.isdigit()
True
>>> temp='1a23'
>>> temp.isdigit()
False
>>> temp='123'
>>> temp.isdigit()
True
>>> not temp.isdigit()
False
页: [1]
查看完整版本: while not temp.isdigit():