Back to Blog
Python 3 write to file utf 86/22/2023 ![]() ![]() Fill in the missing code in the following cell to add guests to the *guests.txt* file as they check in. # Now suppose we want to update our file as guests check in and out. # The output shows that our *guests.txt* file is correctly populated with each initial guest's first name on its own line. To check the contents of the newly created *guests.txt* file, run the following code. # No output is generated for the above code cell. The file will automatically populate with each initial guest's first name on its own line. ![]() Run the following code to create the file. # Let's say we have a text file containing current visitors at a hotel. # In this exercise, we will test your knowledge of reading and writing files by playing around with some text files. # Practice Notebook: Reading and Writing Files
0 Comments
Read More
Leave a Reply. |