Answers for "code for showing contents of a file and printing it in 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 "code for showing contents of a file and printing it in python"

Python Answers by Framework

Browse Popular Code Answers by Language