CLASS 11 PYTHON – QUICK REVISION NOTES
1. Basics of Python
• High-level, interpreted, case-sensitive.
• Comments: # single line, ''' multi line.
2. Variables & Data Types
• int, float, str, bool, list, tuple, dict, set.
• Type conversion: int(), float(), str().
3. Operators
• Arithmetic: + - * / // % **
• Comparison: == != > <
• Logical: and or not
• Assignment: = += -=
4. Input & Output
• Input: input()
• Output: print(), f-strings.
5. Strings
• Immutable, indexing, slicing.
• Functions: len, upper, lower, find, replace.
6. Conditional Statements
if, elif, else.
7. Loops
• while loop
• for loop with range()
8. Lists
• Mutable.
• Methods: append, insert, pop, remove, sort.
9. Tuples
• Immutable.
• Methods: count, index.
10. Dictionary
• Key-value pairs.
• Methods: keys, values, items, update.
11. Sets
• No duplicates.
• Operations: add, remove, union, intersection.
12. Functions
def function(): return value.
13. Modules
import, from import.
14. File Handling
• Modes: r, w, a.
• read(), readline(), write(), close().
15. Errors & Exceptions
try–except–finally.