Answers for "files and exceptions not working python"

0

files and exceptions not working python

try:
    f = open(fname, 'rb')
except OSError:
    print "Could not open/read file:", fname
    sys.exit()

with f:
    reader = csv.reader(f)
    for row in reader:
        pass #do stuff here
Posted by: Guest on May-05-2021

Code answers related to "files and exceptions not working python"

Python Answers by Framework

Browse Popular Code Answers by Language