Question: ' ' ' Name : your full name File : registration.py ' ' ' # a function to open a file, registration,txt , name the

'''
Name : your full name
File : registration.py
'''
# a function to open a file, registration,txt, name the file object to "file_registration", and display the list of the courses
# this function is only to display the file to the console
def read_enrollment():
'''
Before we read the contents of the file, we tell Python which file we're going to work with by using the open() function.
Remember, after we open a file, explicitly close it when we are done with it by using close().
OR, we will use more convenient way by using "with". Using the with statement is more safer way to handle file I/O,
as it automatically takes care of closing the file.
'''
with open("registration.txt",'r') as file_registration:
# TODO 1 : display the data from registration.txt file(i.e., list of the courses) in the console

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 Databases Questions!