【发布时间】:2011-05-03 01:34:06
【问题描述】:
使用函数,我将如何打印我从文件中读取的 PAY 列表的最低、最高和平均值?
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()
我从来没有设置过这样的东西,谁能帮我开始?我会提前感谢你的回复。请记住,我是新来的,我不知道你是怎么做的……请多多包涵。
【问题讨论】:
标签: python list function printing