Unpacking With Asterisk Operators in Python

preview_player
Показать описание
Learn how to unpack with asterisk operators in Python.

Рекомендации по теме
Комментарии
Автор

Thank you! This makes a little more sense now and my brain broke slightly.

scvscades
Автор

Hey Dan
At first i didn't understand the trick (merging two dictionaries) that appears on your real python website .
But now it's crystal clear
Thank you Dan barder
Expecting more such tricks from real python team .

kiranreddy
Автор

Great video, thanks! Question: Is it possible to unpack the iterable and, at the same time, apply a function to each of the unpacked elements? For example, I have a list of strings that have trailing whitespaces that I want removed. I was thinking of calling the strip() method on each element as the list is unpacked. I tried different ways but I was not successful, so I ended up using list comprehension. Is something like this possible with the unpacking operator?

mercadomarcos
Автор

Note: basically asterisk(*) operator is the default way of merging two iterables

alaminbijoy
Автор

This was a great video. Amazing explanation

keifer
Автор

good explanation. Thank you! What video editing program you use ?

djangolessons
Автор

3:12 I did not expect this. How did this happen? I thought each a, b, and c should have the same values (1...6) as my_list. Could anybody explain to me? Thanks

XuanNguyen-opqs
Автор

thank you very much for your great content! :) very interesting and clear

alhdlakhfdqw
Автор

I have good knowledge of python and am completely confused.

rm