Question: Please fix this error in Python. Here was the assignment. from sys import argv def longest_ word(fn_input): file_inputopen (mary.txt, r) maxLength0 maxWord = for

Please fix this error in Python. Here was the assignment. 
from sys import argv def longest_ word(fn_input): file_inputopen (mary.txt, "r") maxLength0 maxWord = "" for line in file_input: for word in line.split(" "): if maxlength len (word): maxLengthlen (word) maxWord -word return maxword if _name_ "main__"; fn-in-argv [1]1 print(longest_word(fn_in)) In [17]: runfile ("/Users/Jay/Desktop/LAB/ untitled1.py', wdir- /Users/Jay/Desktop/ LAB') Traceback (most recent call last): File "
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
