关于输入判断是否为数字怎么弄?
L=['aa','bb','cc',11,22,33]
for i in L:
if i.isdigit():
print i
else:
print 'no'
判断L里面的值是否为数字,是就打印出来,否就打印no,怎么弄?
L=['aa','bb','cc',11,22,33]
for i in L:
if i.isdigit():
print i
else:
print 'no'
判断L里面的值是否为数字,是就打印出来,否就打印no,怎么弄?
2015-08-12
举报