#!/usr/bin/python
f = open("blah.txt"); # open file
for line in f: # iterate over lines in file
line = line.strip() # strip leading and trailing white space
print ("," + line + ",") # print line between commas
f.close() # close file # close file when done
我想这就是你想要的:
试试这个。。。你知道吗
你想要什么还不完全清楚。也许:
相关问题 更多 >
编程相关推荐