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