Variable unpacking - Deepstash

Variable unpacking

Unpacking variables are probably most used for functions that return multiple variables, such as in the example below.

But it is also useful for data types that contain multiple items. The only important notion here is that, if not otherwise defined, variable unpacking results in tuples .

The _ operator is an unnamed variable , essentially a variable that you’re not interested in and won’t be doing anything with, for instance in the following case:


21 reads



The idea is part of this collection:

Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

Related collections

Similar ideas to Variable unpacking


UV radiation has enough energy to break chemical bonds. UV photons can cause ionization, meaning chemical bonds will break that otherwise would not.

It can be useful, for instance, in disinfecting a surface, but it can also damage materials and living tissues, part...

Mixing Concepts And Ideas

Mixing Concepts And Ideas

When you mix practice between two similar ideas or concepts, you’re better able to notice the difference between the two.

This discriminative account in favour of variable practice holds true for many problem-solving skills. Math problems are often taught in a blocked fashion. You learn so...

Structuring Tests

Jest offers describe function to help structure your tests. Use describe to group together all tests that belong to one functionality. Describes can be nested, if you need that. Other functions you'll commonly u...

Read & Learn

20x Faster





Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.


I agree to receive email updates