Function works if I put in the correct input initially, but if I try a wrong input and then enter the correct input, it gives me an attribute error

后端 未结 0 733
时光取名叫无心
时光取名叫无心 2021-01-29 04:52

I have a try/except statement:

def get_file():
   
    myfile = input("Enter the name of the file to read:\\n")

    try:
        open_myfile = open(myf         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题