Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to read a file in python

# How to read, and print to the screen a file in python!

f = open('fileName', 'r')
print(f.read())
f.close()

# Where "fileName" is obviously the name of your file that you want to read.
 
PREVIOUS NEXT
Tagged: #read #file #python
ADD COMMENT
Topic
Name
2+5 =