EADST

Python: Sum the Terminal Input

Python: Sum the Terminal Input

 while 1:
    s = input() # [1,2,3]
    if s != "":
       input_list = s.strip("[").strip("]").split(",")
       a = list(map(int, input_list[:]))
       print(sum(a)) # 6
    else:
        break

相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
站点统计

本站现有博文266篇,共被浏览440742

本站已经建立2019天!

热门文章
文章归档
回到顶部