Prabhath Kota
PySpark, BigData, SQL, Hive, AWS, Python, Unix/Linux, Shortcuts, Examples, Scripts, Perl
Jan 2, 2013
Reading a File with line numbers
file = open("read.txt","r")
text = file.readlines()
file.close()
counter = 1
for line in text:
print counter, line,
counter = counter +1
print
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment