Exploring Tuples in Python
Difficulty: Beginner
Duration: 6 minutes and 1 second
Students: 381
Rating: 5/5
In this lesson, we’ll explore tuple objects a bit closer and we’ll cover the ways to create and use tuples. This lesson is part of a series of content designed to help you learn to program with the Python programming language.
Learning Objectives
- Tuples are a special type of collection used to store a small number of related objects
- Tuples cannot be changed once they’re created
- Tuples can be created by:
- Passing a collection to the built-in tuple function
- Using the parentheses shorthand syntax with each object separated with a comma
- Tuples can be automatically unpacked into name bindings by specifying the same amount of names as objects
Intended Audience
This lesson was designed for first-time developers wanting to learn Python.
Prerequisites
This is an introductory lesson and doesn’t require any prior programming knowledge.