freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

python入門教程(編輯修改稿)

2025-03-17 21:35 本頁面
 

【文章內容簡介】 沒有 switch if a == ?+?: b = ?+? elif a == ??: b = ?? else: b = None ? 布爾表達式 – and, or, not if b = a and b = c: print ?bool is True? if not (b a or c c): print ?not expr, value is True? 循環(huán) While語句 while a b: a = a + 1 For語句 (遍歷序列的元素 ) for item in [3, 4, 10, 25]: print item Print characters one at a time for c in Hello World: print c Loop over a range of numbers for i in range(0,100,2): print i for i in range(len(list1)): print list1[i] 數(shù)字 ? Python 支持四種不同的數(shù)值類型: ? 整型 (int) 例: 1024 ? 長整型 (long) 例: 1024L ? 浮點型 (float) 例: , +e18 ? 復數(shù) (plex) 例: + 數(shù)學函數(shù) abs(x) 絕對值 max(x1, x2,...) 求最大值 min(x1, x2,...) 求最小值 round(x [,n]) 求四舍五入值 sqrt(x) 求平方根 sin(x) 求正弦 cos(x) 求余弦 字符串 string ? 用單引號或雙引號或三個引號創(chuàng)建字符串 s1 = “hello” s2 = ‘hello’ ? 三引號創(chuàng)建的字符串可以跨越多行。 ? 引號前小寫的 u表示這里創(chuàng)建的是一個 Unicode 字符串。 s = u39。Hello World !39。 切片 序列 [開始位置 : 結束位置 ] 序列 [開始位置 : 結束位置 : 步長 ] 右開區(qū)間 s = abcdef“ s[2:4] cd s[2:] cdef s[:2] ab s[:] abcdef s[::2] ace 字符串函數(shù) ? s2 in s 字符串包含判斷 ? (sub [,start [,end]]) int 字符串查找 ? (sub [,start [,end]]) int 字符串反向查找 ? (old, new[, count]) string 字符串替換 ? ([chars]) string 剔除兩端空白 ? 使用 help函數(shù)查詢類型幫助 列表 list ? 賦值 a = [2, 3, 4] A list of integer b = [2, 7, , “Hello”] c = [] d = [
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1