menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Unpacking ...
source image

Medium

1M

read

140

img
dot

Image Credit: Medium

Unpacking Tuples, Lists, and Other Sequences in Python

  • Python allows you to assign values to variables simultaneously using unpacking.
  • Unpacking can be used to extract specific parts of a list while discarding the rest.
  • The * operator can be used to gather remaining elements of an iterable into a list.
  • Unpacking works with sequences of any length and can be used with generator objects as well.

Read Full Article

like

8 Likes

For uninterrupted reading, download the app