Question: Jump to level 1 A file's name is read from input. The file is opened and pear _ file is assigned with the file object.
Jump to level
A file's name is read from input. The file is opened and pearfile is assigned with the file object. Each line in pearfile contains a
name and an integer, representing a customer's name and the number of pears bought by the customer. Read pearfile's contents
as one string and complete the assignment of peardata with the string read.
Click here for example
pearfile input
peardata Your code goes here
pearfile.close
printpeardata
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
