Question: *PYTHON PROGRAM* Replace the code in the function that creates the Python list so that the numbers inserted into the list come from a text
*PYTHON PROGRAM* Replace the code in the function that creates the Python list so that the numbers inserted into the list come from a text file instead of being entered as input from the user.
def function(): li=[] while(True): n=int(input("Enter num ")) if n>0: li.append(n) else: break #sort to obtain nth largest numeber if len(li)>1: li.sort() while(True): n=int(input("enter nth largest number ")) if n>0 and n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
