input and output
write lines:
p = open(dst, 'w+')
s=['12','34','56']
for a in s:
p.write(a + '\n')
p.close()
read lines:
p = open(dst, 'r')
# s = p.read()
# print s
content = p.readlines()
print content
p.close()
['12\n', '34\n', '56\n']
Remove '\n'
p = open(dst, 'r')
lines = [line.strip() for line in p]
print lines
p.close()