Answers for "print contents of file to terminal from python"

1

code for showing contents of a file and printing it in python

import os

with open("filename", "r+") as file:
    content = file.readline()
    while(content!=""):
      	print(content)
        content = file.readline()
    file.close
Posted by: Guest on August-05-2020

Code answers related to "print contents of file to terminal from python"

Python Answers by Framework

Browse Popular Code Answers by Language