中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos
Json.
cn
工具
教程
測評
博客
字典
AI導航
淺色
深色
系統(tǒng)
快捷方式
工具
在線工具 方面快捷
教程
小白教程 助力成長
測評
主機測評 快樂上云
博客
流金歲月 技術沉淀
AI導航
浪潮之巔 奮勇爭先
字典
學習好幫手
John Doe
Admin
個人中心
退出
Python 3 教程
Python3 教程
Python3 簡介
Python3 環(huán)境搭建
Python3 基礎語法
Python3 基本數(shù)據(jù)類型
Python3 解釋器
Python3 注釋
Python3 運算符
Python3 數(shù)字(Number)
Python3 字符串
Python3 列表
Python3 元組
Python3 字典
Python3 集合
Python3 編程第一步
Python3 條件控制
Python3 循環(huán)語句
Python3 迭代器與生成器
Python3 函數(shù)
Python3 數(shù)據(jù)結構
Python3 模塊
Python3 輸入和輸出
Python3 File
Python3 OS
Python3 錯誤和異常
Python3 命名空間/作用域
Python3 標準庫概覽
Python3 實例
Python3 高級教程
Python3 正則表達式
Python3 CGI編程
Python3 MySQL(mysql-connector)
Python3 MySQL(PyMySQL)
Python3 網(wǎng)絡編程
Python3 SMTP發(fā)送郵件
Python3 多線程
Python3 XML 解析
Python3 JSON
Python3 日期和時間
Python3 內(nèi)置函數(shù)
Python MongoDB
Python uWSGI 安裝配置
教程目錄
文章大綱
上一篇:Python 使用遞歸斐波那契數(shù)列
下一篇:Python 字符串判斷
Python 文件 IO
Python3 實例
以下代碼演示了Python基本的文件操作,包括 open,read,write:
實例(Python 3.0+)
# Filename : test.py
# author by :
# 寫文件
with
open
(
"
test.txt
"
,
"
wt
"
)
as
out_file
:
out_file
.
write
(
"
該文本會寫入到文件中
n
看到我了吧!
"
)
# Read a file
with
open
(
"
test.txt
"
,
"
rt
"
)
as
in_file
:
text
=
in_file
.
read
(
)
print
(
text
)
執(zhí)行以上代碼輸出結果為:
該文本會寫入到文件中 看到我了吧!
Python3 實例
其他擴展
上一篇:Python 使用遞歸斐波那契數(shù)列
下一篇:Python 字符串判斷