Reading history
Python

Python Tutorial

Learn Python from scratch: syntax, variables, data types, strings and lists, with runnable examples.

Start learning 70 lessons

Lessons

  1. Python Introduction: What Python Is and Why Learn It
  2. Python Get Started: Install Python, Run Your First Program
  3. Python Syntax: Indentation, Statements, Quotes and Keywords
  4. Python Comments: Single-Line, Multi-Line and Docstrings
  5. Python Variables: Create, Name and Change Them
  6. Python Data Types: int, float, str, bool, list and dict
  7. Python Numbers: int, float, Rounding and the math Module
  8. Python Strings: Slicing, Methods and f-Strings
  9. Python Lists: Create, Index, Slice and Change Lists
  10. Python List Methods: append, sort, pop and More
  11. Python if, elif and else Statements (With Examples)
  12. Python for Loop: range, enumerate, zip and break
  13. Python while Loop: break, continue and while-else
  14. Python Functions: def, Arguments, return and lambda
  15. Python Dictionaries: Create, Access, Update and Loop
  16. Python Tuples: Create, Unpack and Tuple vs List
  17. Python Sets: Union, Intersection and Set Methods
  18. Python Exception Handling: try, except, else, finally
  19. Python File Handling: Read, Write and Append Files
  20. Python Modules: import, Standard Library and pip
  21. Python Classes and Objects: __init__, self and Methods
  22. Python Inheritance: super(), Overriding and MRO
  23. Python Polymorphism and Encapsulation (OOP)
  24. Python String Formatting: f-Strings, format() and %
  25. Python List Comprehension: Syntax and Examples
  26. Python Iterators and Generators: iter, next, yield
  27. Python Decorators Explained With Examples
  28. Python Regex: re.search, findall, sub and Groups
  29. Python datetime: Dates, Times, Formatting and Time Zones
  30. Python Virtual Environment (venv) and pip Guide
  31. Python Lambda Functions, map, filter and Sorting with key
  32. Python *args and **kwargs (Function Arguments Explained)
  33. Python Recursion: Base Case, Call Stack and Memoization
  34. Python JSON: dumps, loads, dump and load with Examples
  35. Python collections Module: Counter, defaultdict, deque, namedtuple
  36. Python math, random and statistics Modules
  37. Python Type Hints: Annotations, Optional, TypedDict and mypy
  38. Python Dataclasses: @dataclass, field, frozen and order
  39. Python Context Managers: with, __enter__, __exit__ and contextlib
  40. Python Unit Testing with unittest and pytest
  41. Python match-case Statement (Pattern Matching)
  42. Python Built-in Functions: enumerate, zip, sorted and More
  43. Python itertools Module with Examples
  44. Python CSV Files: Read and Write with the csv Module
  45. Python pathlib: Working with Files and Folders
  46. Python Mutable vs Immutable, Shallow and Deep Copy
  47. Python Abstract Classes with abc and Protocol
  48. Python Magic (Dunder) Methods with Examples
  49. Python Logging Tutorial: Levels, Handlers and Formatters
  50. Python argparse: Command-Line Arguments Tutorial
  51. Python Scope, global, nonlocal and Closures
  52. Python functools Module: lru_cache, partial, wraps and More
  53. Python Enum: Enum, StrEnum, IntEnum and Flag
  54. Python SQLite3 Database Tutorial With Examples
  55. Python Threading and concurrent.futures
  56. Python asyncio: async, await, gather and TaskGroup
  57. Python heapq and bisect Modules: Priority Queues and Sorted Lists
  58. Python @property, Setters and __slots__
  59. Python Decimal and Fractions: Exact Money and Ratios
  60. Python Project: Command-Line Expense Tracker
  61. Python Sorting: sorted(), sort() and key Functions
  62. Python Unpacking and Star Expressions
  63. Python Protocols and Duck Typing
  64. Python Multiprocessing With ProcessPoolExecutor
  65. Python subprocess: Running Other Programs
  66. Python Bytes, Unicode and Encoding
  67. Python hashlib and secrets: Hashing, Passwords and Tokens
  68. Python pickle and shelve: Saving Python Objects
  69. Python timeit and cProfile: Measuring Speed
  70. Python Project: Student Result System