Tuples and Sets

Learn about other important data structures i.e, Tuples and Sets.

We'll cover the following

Tuples

Tuples are immutable (constant) data structures supported in Python and PowerShell, unlike lists or array lists which can be modified.

Once a Tuple is defined, we cannot delete, add, or edit any values inside it. This can be very helpful in cases where we might pass the control to someone but we do not want them to edit or manipulate data in our data structure. Instead, they may perform operations separately in a copy of this data structure.

PowerShell:

Defining Tuples in PowerShell requires us to use the .NET classes or [System.Tuple] type accelerator.

Get hands-on with 1200+ tech skills courses.