These implementations are for demonstration purposes. They are less efficient than the implementations in the Python standard library.
If you want to analyze data in Python, you'll want to become familiar with pandas, as it makes data analysis so much easier. The DataFrame is the primary data format you'll interact with. Here's how ...