Python
Module 1: Introduction to Python
What is Python?
History and Features of Python
Installing Python and Setting Up IDEs (IDLE, VS Code)
Python Script vs Interactive Mode
Writing & Running Your First Python Program
Comments in Python: #, ''' '''
📗 Module 2: Variables, Data Types, and Operators
Variables: Naming Rules, Declaration, Dynamic Typing
Data Types:
o int, float, str, bool
o list, tuple, dict, set
Type Conversion: int(), str(), float(), etc.
Operators:
o Arithmetic: +, -, *, /, //, %, **
o Relational: ==, !=, <, >, <=, >=
o Logical: and, or, not
o Assignment: =, +=, -=, etc.
o Bitwise: &, |, ^, ~, <<, >>
o Membership: in, not in
o Identity: is, is not
📙 Module 3: Input/Output and String Handling
Input and Output: input(), print(), f-strings
Escape Characters: \n, \t, etc.
String Methods and Operations:
o upper(), lower(), replace()
o split(), join()
o find(), count()
o String Slicing: str[start:end]
📕 Module 4: Control Statements
Conditional Statements: if, if-else, elif
Loops:
o while loop
o for loop with range()
Loop Control: break, continue, pass
📘 Module 5: Functions
Defining and Calling Functions: def
Parameters and Arguments
return statement
*args and **kwargs
Lambda Functions (Anonymous)
Variable Scope: Local vs Global
Recursion (Function calling itself)
📗 Module 6: Data Structures in Python
List:
o Indexing, Slicing
o Methods: append(), insert(), remove(), pop(), sort()
Tuple:
o Immutable, Indexing, Slicing
Dictionary:
o Key-Value Pairs
o Methods: get(), keys(), values(), items()
Set:
o Unique Elements
o Operations: union(), intersection(), difference()
📙 Module 7: Object-Oriented Programming (OOP)
Class and Object Basics
Constructor: __init__()
Instance vs Class Variables
Types of Methods:
o Instance, Class, Static
Inheritance:
o Single, Multilevel, Multiple
Polymorphism and Method Overriding
Encapsulation: Private Members
super() Function
📕 Module 8: Exception Handling
try-except Block
Multiple except Clauses and finally Block
raise and assert
Built-in Exceptions: ZeroDivisionError, TypeError, etc.
Custom Exception Handling (Creating Own Exception Class)
📘 Module 9: File Handling
File Modes: r, w, a, r+
Reading: read(), readline(), readlines()
Writing: write(), writelines()
with open() – Context Manager
Handling CSV and JSON Files
📗 Module 10: Python Standard Libraries
math: sqrt(), ceil(), floor(), pow()
datetime, time Modules
random: randint(), choice(), shuffle()
os, sys: File and OS Interaction
statistics, collections
📙 Module 11: Python Modules and Packages
Creating and Importing Modules
Built-in vs User-defined Modules
import, from-import, as (alias)
__name__ == "__main__" Explanation
Package Structure and __init__.py