Collab Link

Click above image to access the interactive version of this notebook

Python in Practice

  • In the previous modules, we learnt about python’s built-in ‘simple’ types. In this module, we will learn about the different ways in which the data of those types can be organized, so that it can be used (algorithmically) efficiently.

we have already covered str, int, float, and complex. Here, we will also introduce the remaining two – bool and None python’s built-in types

  • We will also take a look at how to reduce code duplication and improve code readability by using Functions.

  • Finally we will look at Exception Handling in which we will learn about ways of making our code handle the errors without crashing.

Data Structures

Python’s most basic data structure is the sequence. Each element of a sequence is assigned a number known as index number. Different types of sequences in Python are:

  • List
  • Tuple
  • Range
  • Text sequence types e.g. str
  • Binary sequence types e.g. bytearray, buffer

Python has several built-in data structures (or compound types) that act as containers and hold the other types. They are:

  • List
  • Tuples
  • Sets
  • Dictionaries
Mohit Sharma
Mohit Sharma
Senior Infrastructure Engineer

DevOps Engineer with 10+ years of experience automating and scaling mission-critical systems. Proven expertise in Kubernetes, AWS, and Linux, with a strong focus on reducing operational complexity, enhancing developer experience, and fostering cross-functional collaboration. A track record of driving infrastructure automation, mentoring teams, and implementing best practices to deliver resilient, highly available systems.