Tuples in Python
Tuples in Python
- Tuples
- List - sequence, duplicates allowed, mutable(can change / modify)
- Dictionary
- Set - non-sequence, duplicate not allowed
list1 = [4,5,6,7,8,8]
mySet = set(list1)
print(mySet) = {4,5,6,7,8}
Tuples :-
Tuples is an ordered collection of elements enclosed within ().
Tuples are immutable (once created cannot be update(change))