Tag Archives: python
Understanding *args and **kwargs in Python 3
Understanding *args In Python, the single-asterisk form of args can be used as a parameter to send a non-keyworded variable-length argument list to functions. It is worth noting that the asterisk () is the critical element here, as the word args is the established conventional idiom, though the language does not enforce it. Suppose we […]
Stop Using Square Brackets to Get a python Dictionary Values
A python dictionary is an unordered set of keys and values. That means : Each data point has an identifier (key) and a value. The keys must be unique to that dictionary — no repetitions. The keys have no explicit order — unlike a list. To define a dictionary, use curly braces and separate each […]