Collections are containers that are used to store collections of data, such as lists, dictionaries, and tuples. In Python, there are several built-in collections that provide different ways to store and manipulate data. These collections are designed to be efficient and easy to use, and they can be used to solve a wide range of programming problems.
Some examples of built-in collections in Python include:
- List: A collection of elements that are ordered and changeable. Lists are written with square brackets.
- Tuple: A collection of elements that are ordered and unchangeable. Tuples are written with parentheses.
- Set: A collection of unique elements that are unordered and unindexed. Sets are written with curly braces.
- Dictionary: A collection of key-value pairs that are unordered and changeable. Dictionaries are written with curly braces and colons.
The choice of collection to use depends on the specific requirements of your program. Here are some general guidelines:
- If you need to store an ordered collection of elements that can be changed, use a list.
- If you need to store an ordered collection of elements that cannot be changed, use a tuple.
- If you need to store a collection of unique elements and order is not important, use a set.
- If you need to store a collection of key-value pairs and order is not important, use a dictionary.
The methods for adding or removing elements from a collection depend on the specific type of collection. Here are some examples:
- List: Use the append() method to add an element to the end of the list, and the remove() method to remove an element by value.
- Tuple: Tuples are immutable, so you cannot add or remove elements. You can, however, create a new tuple with the desired elements.
- Set: Use the add() method to add an element to the set, and the remove() method to remove an element by value.
- Dictionary: Use the square bracket notation to add or update a key-value pair, and the del keyword to remove a key-value pair by key.

I started working for myself at 9. My first tax bill showed up at 14. I didn’t understand it, and nobody around me could really explain it. If you’ve been there, you get it. Twenty years later, after creative directing for brands in New York and buying and selling a few companies, I kept seeing the same thing: smart, talented people losing money to a system that wasn’t built for how they work. That’s why I built WorkMade. Not to make taxes “easier to understand” but to make them disappear into the background, so you can get on with your life.