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 Development Engineer, DevOps

DevOps engineer with a strong Linux background and over a decade of experience designing, automating and managing mission critical infrastructure deployments by leveraging SRE principles and other DevOps processes. Expert in scripting using python with an emphasis on real-time, high speed data pipelines and distributed computing across networks.