
本文共 1543 字,大约阅读时间需要 5 分钟。
������������������Python���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
1. ������������
a, b = 1, 2
���Python������������������������������������������������������������������������������a
���������1���b
���������2���������a = (1, 2)
���
2. ������������������
c, d = 3, 4
������������������������Python������������������parallel assignment���������������������������������������������������������������c
���������3���d
���������4���
3. ������������
e, *f, g = 5, 6, 7, 8, 9
������������������������������������������������������������������������������������������e
���������������5���f
������������������������������6, 7, 8���������g
���������������9���
4. ������������
{'key1': 'value1', 'key2': 'value2'}
������������������������������������������������������������������������������
5. ������������
items, rest = [1, 2, 3, 4, 5],[]
���������������������������������������������������������������������������������������������������������������������
6. ������������
x = (1, 2, 3)
*x, y = 1, 2, 3
���������������������������������������������������������������������������������������x
���������������(1, 2, 3)���������������������������������������������������
���������������������������������������������������������������������������������������������������������������������Python������������������������������������������������������������������������������������Python���������������������������
发表评论
最新留言
关于作者
