在Python 中程式若發生錯誤會引發例外,以上例而言就是引發 IndexError ,如果程式沒有 ... except FileNotFoundError: print('找不到檔案{0}'.format(sys.argv[1])).
確定! 回上一頁