Please enable JavaScript.
Coggle requires JavaScript to display documents.
Python - Beginner, English Vocabulary, Python - Coggle Diagram
-
-
Python
Date Structures
-
-
-
-
5 Pillars
1 - Ordering:
List: Lists are ordered collections, which means the order of elements is preserved. You can access elements in a list using their index (position in the list).
Set: Sets are unordered collections. The order of elements is not guaranteed, and you cannot access elements by index.
2 - Uniquenes
List: Lists can contain duplicate elements. Each element in a list is distinct, and you can have the same value appearing multiple times.
Set: Sets, on the other hand, only store unique elements. If you try to add a duplicate element to a set, it will not be included.
3 - Mutability:
List: Lists are mutable, meaning you can modify their elements by assigning new values to specific indices, adding or removing elements, etc..
Set: Sets are also mutable, but you cannot change individual elements directly. You can add or remove elements from a set.
-
5 -Use Cases:
List: Use lists when you need an ordered collection with the possibility of duplicate elements, and you want to access elements by their index.
Set: Use sets when you need an unordered collection of unique elements, and you want to perform set operations like union, intersection, and difference.
-
Operators
-
-
Comparasion, Logical, and Menbership Operations
-
-
-
-
-
-