Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
    
 
PREVIOUS NEXT
Tagged: #code #showing #contents #file #printing #python
ADD COMMENT
Topic
Name
9+7 =