Question: please answer these two questions What is output by the following code segment when input.txt contains the following words: apple , pear, and banana stored


please answer these two questions
What is output by the following code segment when input.txt contains the following words: apple , pear, and banana stored one per line? "r") infile = open("input.txt", for word in infile print (word) apple pear banana apple pear banana apple pear banana apple, pear, banana
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
