Session 3: Python Data Structures And Functions

Hello everyone!

Use this thread to ask questions about topics covered in Session 3.

General rules to follow:

  • Indicate the quiz or exercise name at the beginning of your post.
  • Write down your question in as much detail as you possibly can.
  • If your question involves code, please include it in code blocks below with comments and avoid posting screenshots.

Slides not loading ! Can you please check the issue?

Any update please ?

The 8 Data Structures every Data Sci entist should Know.

Earlier as well it ask for upgrade or paid subscription, Can you please share links where in we get free access to such knowledge ? PLease avoid material which requires money to read from it.

Hello Manish,

We are looking into the issue with regards to the slides not loading. We will get back to you very soon about it.

Also, we will be taking your suggestion about the articles and you will see it reflected in the future sessions.

Thanks & Regards,


Hello Manish!

I echo what our teaching staff Nawang has said. Thank you for reaching out.

I believe that article was not behind a paywall when we added it. Nonetheless, here is a summary to make sure you don’t miss out:

Data Structures in Data Science: A Primer

Why are Data Structures Essential in Data Science?
Data scientists need efficient ways to organize, store, and access data. Understanding which data structure to use can significantly influence the efficiency of a given task, whether it’s feeding data into a model, storing results, or visualization.

Inbuilt Python Data Structures:

  1. List: An ordered, indexable, and mutable structure that can hold duplicate items. Lists are versatile and commonly used because of their ability to easily access items by index.
  2. Dictionary: Comprising key-value pairs, dictionaries are mutable and indexable by key. They’re excellent for efficient searching when keys are known, but can’t have duplicate keys.
  3. Set: Unordered collections that cannot have duplicates. Useful when only unique values are required or to find overlaps between data sources.
  4. Tuple: An ordered and indexable structure, similar to lists but immutable. They’re useful when ensuring that data remains unchanged, such as storing model outputs.

Abstract Data Types:

  1. Queue: Mimics real-life queues with a First-In-First-Out (FIFO) logic. Useful for tasks like scheduling CPU jobs or breadth-first search algorithms.
  2. Stack: Operates on a Last-In-First-Out (LIFO) logic, useful when the most recent addition is the primary concern, as in code interpretation or undo operations.
  3. Linked List: Collections of nodes in a linear order, either singly (pointing forward) or doubly (pointing both ways). Efficient for insertions and deletions compared to traditional lists.
  4. Graph: Represents entities (vertices) and their relations (edges). Useful in diverse scenarios from road networks to social media platforms.

Data scientists frequently interact with various data structures, each with its benefits and trade-offs. Knowing when to use which structure is pivotal for efficient data handling and processing. Moreover, familiarity with these structures can be a great asset in data science and software engineering interviews.

Hope this helps!

All the best,


1 Like

Thank you for for loading the videos and slides accessible to both Shibhani and Nawang. Really appreciate the efforts.