can_iter_list = [1,2,3,4,5]
can_iter_str = "hansz"
can_iter = can_iter_str
a,b,c,d,e = can_iter
a,_,b,_,c = can_iter
# 只要是可迭代的对象都可以分解,包括生成器和迭代器等
can_iter_list = [1,2,3,4,5]
can_iter_str = "hansz"
can_iter = can_iter_str
a,*b = can_iter
record = ("acme",50,11,22,(12,11,2012))
name,*_,(*_,year) = record
from collections import deque
my_deque = deque(maxlen=5)
my_deque.append(1)
# my_deque 最多只能存储5个元素
import heapq
a = [1,4,5,542,342,423,1,653,4]
heapq.nlargest(3,a)
heapq.nsmallest(4,a)