實際上,不用自行定義 with_file 這樣的函式,Python 提供了 with as 語法來解決這類需求。例如:. import sys for arg in sys.argv[1:]: try: with ...
確定! 回上一頁