一. list列表扩展的方式有几种(或者说添加元素的方法)
1:append 将对象追加到列表中最后一个元素的末尾。
2:extend 通过从可选对象追加元素来扩展列表。
3:insert 在索引前插入对象,以此来扩展列表。
二. 对["cherry", "litchi", "strawberry", "mangosteen", "pomelo", "pineapple", "pitaya", "durian"]进行默认排序
对上面的列表使用第三个字母进行排序
三. dict中所有方法的使用(先写源代码再写样例)
1:clear
clear(...) | D.clear() -> None. Remove all
2:copy
copy(...) | D.copy() -> a shallow copy of D
3:get
get(self, key, default=None, /)
4:items
items() -> a set-like object providing a view on D's items
5:keys
keys(...) | D.keys() -> a set-like object providing a view on D's keys
6:pop
pop(...) | D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
7:popitem
popitem(self, /) | Remove and return a (key, value) pair as a 2-tuple.((key, value))
8:setdefault
setdefault(self, key, default=None, /) | Insert key with a value of default if key is not in the dictionary.
9:update
Update D from dict/iterable E and F. | If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] | If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v | In either case, this is followed by: for k in F: D[k] = F[k]
10:value
values(...) | D.values() -> an object providing a view on D's



