Question: For this lab, you will write a Python program that will create and edit a text file called users.txt . The file should be created

For this lab, you will write a Python program that will create and edit a text file called
users.txt. The file should be created in the same folder as your python file and will
contain a list of usernames, with one name per line.
Your program should only define and implement the following functions:
create_file-Accepts no arguments and creates the empty file called
users.txt
add_user - Accepts a username as an argument and appends it to the file
update_user - Accepts an old username and a new username as separate
arguments and replaces any instance of that the old username with the new
username in the file.
remove_user - Accepts a username as an argument and removes the user
from the file
For this lab, you will write a Python program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!