Categories
How to display the contents of a text file in Python?
There is a text.txt file, how to display the contents of the file?
Answer the question
In order to leave comments, you need to log in
with open('text.txt', 'r') as file: read_file = file.read() print(read_file)
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question