pycharm中配置main參數 Run->Edit Configurations->Script Parames
把需要在xxx.py A B C 后面的參數輸入到如下位置。
否則會報錯:int(sys.argv[1]) IndexError: list index out of range 表示沒有接收到相應的參數
pycharm中配置main參數 Run->Edit Configurations->Script Parames
把需要在xxx.py A B C 后面的參數輸入到如下位置。
否則會報錯:int(sys.argv[1]) IndexError: list index out of range 表示沒有接收到相應的參數
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。