摘要:
注:dic表示定义的一个字典变量,如:dic = {'name': 'shawn', 'age': 18} 增: 1. dic['love'] = 'girl' 直接通过新的键值对进行添加 dic = {'name': 'shawn', 'age': 18} dic['love'] = 'girl' 阅读全文
posted @ 2019-12-25 18:29
Shawn-Hu
阅读(600)
评论(0)
推荐(0)
摘要:
注:lst为定义的列表变量,如:lst = [1, 2, 3, 4, 5] 增: 1. lst.append() 末尾追加 lst = [1, 2, 3, 4, 5, 6] lst.append(7) print(lst) 打印结果: [1, 2, 3, 4, 5, 6, 7] View Code 阅读全文
posted @ 2019-12-25 11:18
Shawn-Hu
阅读(198)
评论(0)
推荐(0)
浙公网安备 33010602011771号