You have the following function. 1 def funct(a): file = open('file.txt') 3 while True: line = file.readline() if a in line: 4 print(line) file.close() 7 The contents of the file named file.txt is as...


You have the following function.<br>1 def funct(a):<br>file = open('file.txt')<br>3<br>while True:<br>line = file.readline()<br>if a in line:<br>4<br>print(line)<br>file.close()<br>7<br>The contents of the file named file.txt is as follows:<br>python<br>python is great!<br>python is the best<br>python is amazing!<br>What would the value of a be if the output is:<br>python is great!<br>python is amazing!<br>Answer:<br>

Extracted text: You have the following function. 1 def funct(a): file = open('file.txt') 3 while True: line = file.readline() if a in line: 4 print(line) file.close() 7 The contents of the file named file.txt is as follows: python python is great! python is the best python is amazing! What would the value of a be if the output is: python is great! python is amazing! Answer:

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here