PYTHON CORE · LESSON 36
Read the file.
Mode r and read · about 13 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Read the finished story.txt file. To get a real output, first create a file in VS Code.
with open("story.txt", "r", encoding="utf-8") as file:
text = file.read()
print(text)Open the editor for class workSolve it yourself
Напиши код, который читает note.txt из прошлого урока в режиме r с encoding="utf-8", сохраняет содержимое в text и выводит text. Назови переменную файла file.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework