Lists in Python are ordered, mutable sequences used to store collections of items.
Tuples in Python are created using parentheses.
The append() method adds an item to the end of a list.
Values in a dictionary are accessed using square brackets with the key inside.
Sets in Python do not allow duplicate elements.
The get method returns the specified default value if the key is not found in the dictionary.
Tuples are immutable and can have duplicate elements.
Advertisement
The pop() method removes and returns the last item from a list.
Sets do not allow duplicate elements, so adding an existing element does not change the set.
The | operator is used to merge two dictionaries in Python 3.9 and later.
The in keyword is used to check if a key exists in a dictionary