Core Python (must-know basics)

  • Variables & Data Types (int, float, string, bool, list, tuple, dict, set)
  • Type conversion & casting (int(“5”), str(10))
  • Input/Output (input(), print())
  • Operators (arithmetic, logical, comparison)
  • If/else, loops (for, while)
  • Functions (def, return, arguments, default arguments, *args, **kwargs)

✅ Practice: Write a program to find factorial, Fibonacci, prime numbers, reverse a string, etc.

Data Structures & Built-ins

Python is powerful because of its inbuilt data structures. Learn how to use them.

  • List: append, pop, slice, sort
  • Tuple: immutable list
  • Set: unique elements, union, intersection
  • Dictionary: key-value pairs, get, update, iteration
  • String methods: split, join, replace, strip

✅ Practice:

  • Remove duplicates from a list.
  • Count frequency of words in a string.
  • Sort a dictionary by value.

Intermediate Python

  • List comprehension ([x**2 for x in range(5)])
  • Lambda functions, map, filter, reduce
  • Enumerate, zip
  • File handling (with open(“file.txt”) as f)
  • Exception handling (try-except-finally)

✅ Practice:

  • Read a file and count lines, words, characters.
  • Merge two lists into a dictionary with zip().

OOP (Object Oriented Programming)

  • Class, object
  • init constructor
  • Inheritance, polymorphism, encapsulation
  • @staticmethod, @classmethod
  • Magic methods (str, len)

✅ Practice:

  • Create a BankAccount class with deposit/withdraw.
  • Create a Shape base class and Circle/Rectangle subclasses

Important Libraries

For DevOps/Cloud/Product roles, you won’t need heavy ML stuff. Just:

  • os → system operations
  • sys → command line arguments
  • datetime → date/time
  • json → read/write JSON
  • re → regex

Problem-Solving (DSA in Python)

Even if you’re not aiming for hardcore coding roles, interviewers expect problem-solving ability. Focus on:

  • Arrays & Strings
  • Hashmaps (dict in Python)
  • Stacks & Queues (use list/deque)
  • Basic recursion
  • Searching & Sorting

✅ Practice on LeetCode / HackerRank (Easy & Medium):

  • Two Sum
  • Valid Parentheses
  • Reverse Linked List
  • Merge Sorted Arrays
  • Anagrams