Hi, I just want to delete "\n" at each line. My operating system is ubuntu
9.1. The code is as follows

#!/usr/bin/python
import string
fileName=open('Direct_Irr.txt', 'r') # read file
directIrr = fileName.readlines()
fileName.close()
for line in directIrr:
       line.rstrip('\n')
print directIrr

But I found there is still "\n" . Could someone help me why it is not
correct?

Thank you
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to