标签:continue 参数 encoding sys 计算 class coding odi port
#encoding=utf-8
import sys
sum=0
for i in sys.argv[1:]:
try:
number=float(i)
except:
continue
sum+=number
print sum
#encoding=utf-8
import sys
letter_count=0
for i in sys.argv[1:]:
if i.isdigit():
letter_count+=float(i)
print letter_count
标签:continue 参数 encoding sys 计算 class coding odi port
原文地址:https://www.cnblogs.com/luo25236240/p/9255417.html