python读取文件中的内容并输出,Python-从文本文件读取逗号分隔的值,然后将结果输出到文本文件...
BasicallyIneedtocreateaprogramthatwilladdnumbersreadfromatextfileseparatedbycommas.ieinfile.txt1,2,34,5,67,8,9SofarIhavethesimplecodex=1y=2z=3sum=x+y+zprint(sum)I'mnotsurehowIwouldassigneachnumberinth