Answers for "try open file"

0

try open file

try:
    with open("file.txt","r") as f:
        #stuff goes here
except IOError:
    #do what you want if there is an error with the file opening
Posted by: Guest on October-02-2021

Python Answers by Framework

Browse Popular Code Answers by Language