l = [‘Michael‘, ‘Bob‘, ‘Tracy‘] l.append(‘Bob‘) l.pop() print(1) t = (‘Michael‘, ‘Bob‘, ‘Tracy‘) scores = [95, 70, 60] d = {‘Michael‘: 95, ‘Bob‘: 70, ‘Tracy‘: 60} d[‘Bob‘] = 82 d[‘Rose‘] = 88 d.pop(‘Bob‘) print(d) sl = {‘Michael‘, ‘Bob‘, ‘Tracy‘} s2 = {‘Michael‘, 2, 3} sl.add(12) s2.remove(3) print(sl, s2) dl = dict(zip(l, scores)) print(1) print(scores) print(dl)
原文地址:https://www.cnblogs.com/eric9728eric9728/p/9157119.html
时间: 2024-10-20 13:58:13