摘要:
# 下午 # 嵌套 # l = [[]] l = [[],[]] l = [[1,2,3,4],[5,6,7,8]] print(l[0]) # [1, 2, 3, 4] l = [[1,2,3,4], [5,6,7,8]] print(l[1][2]) # 找第二行第三个元素 # 两个集合之和 l 阅读全文
摘要:
# 九九乘法表 y = 1 while y <= 9: s = 1 while s <= y: print(f'{y}*{s} ={y*s} ', end=("")) s += 1 print() y+=1 # 1*1 =1 # 2*1 =2 2*2 =4 # 3*1 =3 3*2 =6 3*3 = 阅读全文
摘要:
>>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Compl 阅读全文
摘要:
l = [88,97,79,89,76] l.sort() # 正序排序列表 l1 = list() # 赋值 l1 list() 空list for i in range(len(l)+1): # 把i 循环 len(l)+1 空出一个位置 l1.append(0) # 赋值 l1 list (0 阅读全文