既然python內建函式那麼方便,為何還需要std? 因為有些軟體會有按鈕 , 提示框… 都屬物件的一種,而 input() 本身也有方法、屬性,如果只想給個方法(如:sys.stdin.readline)單純輸入,比較推薦使用std ,重要的是能做跨文件或環境的I/O
補充: 資料處理:檔案流 , python中sys.stdout、sys.stdin的用法 , Input / Output (輸入輸出)
可以用在不同的作業系統
different OS has different file system
自動化處理文件: rename, move, create, remove
Linux/UNIX/macOS: use / to separate directory
note: In Linux/UNIX, there’s only one root directory
Windows: use \ to separate directory
note: 可以有 A:\ B:\ C:\ (通常C drive 是OS存放的地方)
Note: 寫code時要注意避免使用 / 或 \ ,因為會被判讀為路徑