Exercise 1: Introduction to Tuples
Welcome to Python 2, Lesson 3! Today, we'll learn about tuples, another important data structure in Python.
What is a Tuple?
A tuple is an ordered, immutable collection of elements. This means once you create a tuple, you can't change its contents.
Here's how to create a simple tuple:
Now it's your turn! Create a tuple called colors with the following items:
- red
- green
- blue
After creating the tuple, print it and its type to see the result.
# Create the colors tuple here
# Print the tuple and its type