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 Software Engineer II, Developer Productivity

Platform and reliability engineer with 12+ years of experience designing and scaling mission-critical systems across Kubernetes, cloud infrastructure, and Linux. I lead cross-functional initiatives that improve reliability, security, and developer productivity, and build platforms and AI-enabled automation that reduce operational toil and help engineering teams ship faster and more safely.