flâneur — a map of the web's best reading

All you need to know about Asterisks in Python - Bas codes

bas.codes · 1,386 words · saved by 1 readers

In this article we learn about the deconstruction operators (`*` and `**`) in Python and how to use them with functions, list, and dictionaries.

All you need to know about Asterisks in Python - Bas codes All Articles All you need to know about Asterisks in Python Follow @bascodes Most developers know the asterisk ( * ) character as multiplication operator in Python: product = 4 * 2 # 8 However, the asterisk has some special meaning for list or dictionary data structures. *args and **kwargs *args in the function definition The most widely known usage of the asterisk operator, also known as destructuring operator, in Python is its usage in functions. Let’s say you have a function that can add values and returns the sum of these values: d

Explore this link on the map →

related reading