23. Python Lists
Create List
Access List Items
Change List Items
Add List Items
append() adds an item to the end.
Remove List Items
remove() deletes a specified item.
Loop Lists
List Comprehension
Sort Lists
Copy Lists
Join Lists
Common List Methods
24. Python Tuples
24.1 Create Tuple
Output
24.2 Tuple Length
Output
len() returns the number of items in a tuple.
24.3 Create Tuple With One Item
Output
24.4 Tuple Data Types
Output
24.5 Access Tuple Items
Output
24.6 Negative Indexing
Output
24.7 Range of Indexes
Output
24.8 Check if Item Exists
Output
in checks whether an item exists.
24.9 Change Tuple Items
Output
24.10 Add Items
Output
24.11 Remove Items
Output
24.12 Unpack Tuples
Output
24.13 Using Asterisk (*)
Output
* collects remaining values into a list.
24.14 Loop Through Tuple
Output
for.
24.15 Join Tuples
Output
+ joins two tuples.
24.16 Multiply Tuples
Output
* repeats tuple elements.
24.17 Tuple Methods
count()
index()
25. Python Sets
25.1 Create Set
Output
25.2 Set Length
Output
25.3 Duplicate Values
Output
25.4 Access Set Items
Output
25.5 Check Item Exists
Output
in checks item existence.
25.6 Add Items
Output
add() inserts one item.
25.7 Add Multiple Items
Output
update() adds multiple items.
25.8 Remove Item
Output
remove() deletes an item.
25.9 discard()
Output
discard() doesn’t raise an error if the item doesn’t exist.
25.10 pop()
Output
25.11 clear()
Output
25.12 Loop Set
Output
25.13 Join Sets (Union)
Output
25.14 Intersection
Output
25.15 Difference
Output
Common Set Methods
26. Python Dictionaries
26.1 Create Dictionary
Output
26.2 Dictionary Length
Output
26.3 Access Items
Output
26.4 get()
Output
get() safely returns a value.