Question: Jump to level 1 A file's name is read from input. The file is opened and cap _ file is assigned with the file object.

Jump to level 1
A file's name is read from input. The file is opened and cap_file is assigned with the file object. Each line in cap_file contains a name and a color, representing a customer's name and the color of the cap bought by the customer. Read cap_file's contents as a list of strings, where each string is a line in cap.file, and complete the assignment of cap_data with the list read.
Click here for example
Ex: If the input is dat a 3,txt and:
Contents of file data3.txt
Mel brown
Eli orange
Mai red
then the output is:
\table[[data2.txt data3.txt,data4.txt,data5.txt,data6.txt]]
1 cap_file input ()
 Jump to level 1 A file's name is read from input.

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!