Python Handwritten Notes (Beginner to Intermediate)
1. Introduction to Python
Python is a high-level, interpreted programming language known for its simplicity and readability.
It is widely used in web development, data science, AI, automation, and more.
2. Variables and Data Types
Variables store data values. Python does not require explicit declaration.
Data Types: int, float, str, bool
3. Input and Output
input() is used to take input from user.
print() is used to display output.
4. Operators
Arithmetic: +, -, *, /, %
Comparison: ==, !=, >, <
Logical: and, or, not
5. Conditional Statements
Used for decision making: if, elif, else
6. Loops
for loop and while loop are used for iteration.
7. Functions
Functions are reusable blocks of code defined using def keyword.
8. Lists
Lists store multiple items in a single variable. Example: [1, 2, 3]
9. Tuples
Tuples are immutable collections.
10. Dictionaries
Store data in key-value pairs.
11. Sets
Unordered collection of unique elements.
12. File Handling
open(), read(), write() are used to handle files.
13. Exception Handling
try, except blocks handle errors.
14. Object-Oriented Programming
Concepts: Class, Object, Inheritance, Polymorphism.
15. Modules and Packages
Modules are files containing Python code. Packages are collections of modules.