What is Tuple in Python?
A Tuple in Python is a collection of elements that is ordered and immutable (we cannot change its elements after creation). We create a tuple using round brackets (). Example of Tuple: numbers = (10, 20, 30, 40, 50) print(numbers) print(numbers[0]) print(numbers[2]) Output: (10, 20, 30, 40, 50) 10…
Read the full story at DEV Community — AI ↗
Timeline · 1 report
- 2026-12-01 15:10 · DEV Community — AI
What is Tuple in Python?