Read lines into a buffer : Readlines : File PYTHON TUTORIALS


PYTHON TUTORIALS » File » Readlines »

 

Read lines into a buffer


filePath = "input.txt"

buffer = "Readline buffer:n"
inList = open(filePath, 'rU').readlines()
print inList
for line in inList:
    buffer += line
print buffer



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo File
» Readlines