python: add to notes on tuples
This commit is contained in:
parent
737340a77b
commit
f20bb808a0
1 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,7 @@ tags: [python, data-structures]
|
|||
|
||||
# Tuples in Python
|
||||
|
||||
Tuples are one of the main data-structures or containers in Python.
|
||||
Tuples are one of the main data-structures or containers in Python. Tuples are useful in cases where you want to group related data and ensure that it will not change.
|
||||
|
||||
Tuples have the following properties:
|
||||
|
||||
|
@ -16,6 +16,8 @@ Tuples have the following properties:
|
|||
- **Allow duplicate** members
|
||||
- They are **indexed**
|
||||
|
||||
> In essence a tuple is a list that is immutable.
|
||||
|
||||
As with all containers in Python they permit any data type.
|
||||
|
||||
> Tuples are denoted with `(...)`
|
||||
|
|
Loading…
Add table
Reference in a new issue