iT邦幫忙

1

[Python學習筆記] 文件I/O-Day2

JJ 2021-03-25 22:01:47926 瀏覽

讀取鍵盤輸入

input函數
https://ithelp.ithome.com.tw/upload/images/20210325/20136223uq9uTerunf.jpg

讀取和寫入標準輸入和輸出
https://ithelp.ithome.com.tw/upload/images/20210325/20136223gPjiDe5jUr.jpg

開啟的txt檔案會寫入
https://ithelp.ithome.com.tw/upload/images/20210325/20136223d63jD2pm0K.jpg

程式中的"w"是模式
fo = open("IO.txt","w")
可依照情況修改
https://ithelp.ithome.com.tw/upload/images/20210325/201362234YRUzkN6jm.jpg


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言