Question: import csvimport sysFILENAME = names.csv def main ( ) : try: names = [ ] with open ( FILENAME , newline =
import csvimport sysFILENAME "names.csvdef main: try: names with openFILENAME newline as file: reader csvreaderfile for row in reader: names.appendrow except FileNotFoundError as e: printfCould not find FILENAME file." sysexit except Exception as e: printtypee e sysexit printnames if namemain: mainRefer to Code If the for statement in the try clause refers to readers instead of reader, what type exception will be thrown and caught?
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
