Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
Extended unpacking (`Python 3 Only`):

>>> a, *b, c = [1, 2, 3, 4, 5]
>>> a
1
>>> b
[2, 3, 4]
>>> c
5

This way first and last list element will be unpacked into a and c and other values will be inside of b variable.

#python #python3 #unpack #extended_unpack