使用函数,如何打印从文件中读取的工资单的最低、最高和平均值?在
try:
text_file = open ("Pay.txt", "w")
text_file.writelines(Pay)
text_file.close()
except (IOError):
print 'Error opening/writing Pay.txt'
try:
text_file= open("Pay.txt","r")
PAY_= text_file.readlines()
text_file.close()
PAY_.sort()
我从来没有做过这样的事,有人能帮我开始吗?我会提前感谢你的答复。记住,我是新来的,我不知道你是怎么做的…请容忍我。在
假设每行有一个数字:
相关问题 更多 >
编程相关推荐