Dev Shed Forums - Python Programming http://forums.devshed.com/ Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language. en Sun, 21 Apr 2019 01:25:13 GMT vBulletin 60 http://forums.devshed.com/images/misc/rss.png Dev Shed Forums - Python Programming http://forums.devshed.com/ determining special charecters http://forums.devshed.com/python-programming/981423-determining-special-charecters-new-post.html Wed, 10 Apr 2019 10:37:42 GMT I have a data file named data1.txt with content: 11,Allan,8/26/2011 12,Bob,9/26/2012 13,Cyril,10/25/2014 But I cannot able to extract the line termination character using this code: Code: --------- I have a data file named data1.txt with content:
11,Allan,8/26/2011
12,Bob,9/26/2012
13,Cyril,10/25/2014

But I cannot able to extract the line termination character using this code:

Code:

import os
import collections
import sys
import codecs
import csv


inFile=data1.txt
field = open(inFile,'r').readlines()
for line in csv_obj:
    print(repr(line))

it is giving out put as:

'11,Allan,8/26/2011\n'
'12,Bob,9/26/2012\n'
'13,Cyril,10/25/2014'


I need the out as \n. ]]>
Python Programming pranabpal http://forums.devshed.com/python-programming-11/determining-special-charecters-981423.html