标签:rgba append style print pen end col 工资 i+1
直接上代码:
url = "D://zhangdan.txt" arr = [] sum = 0 with open(url) as f: for i in f: arr.append(float(i)) for i in range(len(arr)): print(f‘{i+1}号 : {arr[i]}元‘) sum = sum + arr[i] print(f‘该月份工资为{sum}元‘)
标签:rgba append style print pen end col 工资 i+1
原文地址:https://www.cnblogs.com/3-wusen/p/14398297.html