← Back to the lesson: Tuples
Access Tuple Items
The exercise
Given: rgb = (255, 128, 0)
Print each color component on a separate line:
- First (red): 255
- Second (green): 128
- Third (blue): 0
Starter code
rgb = (255, 128, 0)
# Print red / Выведите красный
# Print green / Выведите зелёный
# Print blue / Выведите синий
Write the code in the browser and run it — no installation needed.