有没有pythonic方法解压缩第一个元素中的列表和单个命令中的"尾部"?
例如:
>> head, tail = **some_magic applied to** [1, 1, 2, 3, 5, 8, 13, 21, 34, 55] >> head 1 >>> tail [1, 2, 3, 5, 8, 13, 21, 34, 55]
python list tail head
head ×1
list ×1
python ×1
tail ×1