ll list(range(1, 16)) # 用range来创建数据,list()转化为列表类型
ll map(lambda x: x * 3, ll)
print(ll)
print(list(ll))
# func: all()
print( all() 全部元素非 False,ret True;nor False )
print(all([ , a , 7755]))
print(all([313, a ]))
print(all([0]))
# func: any()
print( any() 任意元素 True,ret True;全 False,ret False )
print(any([ , a , 7755]))
print(any([313, a ]))
print(any([0]))
# sort() sorted()
newList list(range(3, 13))
random.shuffle(newList)
print( random sort (start): , newList)
newList.sort()
print( 默认升序排序 , newList) # 默认升序排列
newList.sort(reverse True)
print( 倒叙排序 , newList) # 倒叙排列
newList.sort(key lambda x: len(str(x)))
print( 按照字符串长度排序 , newList) # 按照字符串长度排序
sorted(newList)
print( sorted (two examples /confirm/i): )
print(newList)
print(sorted(newList)) # 这两个print说明sorted并不影响到newList
# zip()
lt1 [3, 7, 1, 0, 8]
lt2 [ D , I , O , P ]
lt3 [ D , I , O , P , MOD ]
zipList1 list(zip(lt1, lt2)) # 非等长list的zip()
zipList2 list(zip(lt1, lt3)) # 等长list的zip()
print(zipList1)
print(zipList2)
# -*- coding: utf-8 -*-
# CloudyTenderness