python中remove用法 python必背函數(shù)?
python必背函數(shù)?1. 函數(shù):Print string2。函數(shù):計(jì)算字符長度3。Format(12.3654,“6.2F”/“0.3%”)函數(shù):實(shí)現(xiàn)格式化輸出4。函數(shù):query object T
python必背函數(shù)?
1. 函數(shù):Print string
2。函數(shù):計(jì)算字符長度
3。Format(12.3654,“6.2F”/“0.3%”)函數(shù):實(shí)現(xiàn)格式化輸出
4。函數(shù):query object Type
5。Int()函數(shù),float()函數(shù),str()函數(shù):類型轉(zhuǎn)換
6。Import()函數(shù):Import library
7。3**4:3的4次方
8。打開()。Write()函數(shù):Write file
9 def function Name(參數(shù)):自定義函數(shù)
10隨機(jī).randint()函數(shù):生成隨機(jī)數(shù)
11。函數(shù)的作用是:返回一個(gè)從1到100的列表并打印
12。Lower()函數(shù):將數(shù)據(jù)改為小寫
13。函數(shù):將數(shù)據(jù)改為大寫
14。啟動開關(guān)功能:判斷是否用s
15打開。函數(shù):在3-1位置前插入數(shù)據(jù)
16 List()函數(shù):將字符串轉(zhuǎn)換為List
17。Del list[2]函數(shù):刪除第二個(gè)數(shù)據(jù)元素
18。Remove(“ha”)函數(shù):刪除原始數(shù)據(jù)中的“ha”元素
19。Eval:計(jì)算Python表達(dá)式
~]>>>> a=[“one”、“two”、“three”]>>>> B={}>>>[B.setDefault(x,y)for x,y in enumerate(a)][“one”、“two”、“three”]>>> B{0:“one”、1:“two”、2:“three”}>>