Skip to content
    Hack The FutureHack The FuturePython Notes

    Free, beginner-friendly learning path · 80 topics

    Python Notes
    from first line to real projects.

    Har topic ko simple explanation, real-life example, code, output aur visual flow ke saath samjho. Apni pace par, bilkul free.

    Start learning
    ✓ Simple explanations✓ Practical code✓ One page per topic
    first_program.py
    name = "Asha"
    print('Hello, ' + name + '!')
    Program output Hello, Asha!

    The complete syllabus

    Choose a unit and start anywhere

    80 short lessons, from Python basics to Django and NumPy.

    UNIT 01

    Introduction to Python

    Plan a solution, meet Python, and write your first readable programs.

    15 topics
    1. 01Planning a Computer ProgramTurn a goal into clear inputs, steps and outputs before writing code.
    2. 02Problem Solving TechniquesUnderstand the problem, split it into smaller tasks, make an algorithm, then test it.
    3. 03History of PythonPython was created by Guido van Rossum and first released in 1991; it grew around readable, practical code.
    4. 04Need of Python ProgrammingPython helps people automate work, analyze information, build websites and create prototypes with concise code.
    5. 05Applications of PythonPython is used in web development, scripting, data science, automation, education and scientific computing.
    6. 06Basics of Python ProgrammingA Python program is made from statements, expressions, names and values that the interpreter executes.
    7. 07Getting Started with PythonInstall Python 3, choose an editor or terminal, and run a tiny program to check your setup.
    8. 08Python Interactive ShellThe interactive shell runs one expression at a time and immediately displays its result.
    9. 09Input, Processing and OutputA program receives input, processes it with rules, and produces output for a person or another system.
    10. 10Editing, Saving and Running Python ScriptsSave Python source in a .py file, then execute it with the Python interpreter.
    11. 11VariablesA variable is a name that refers to a value, so a program can reuse and update information.
    12. 12Assignment StatementsAssignment evaluates the expression on the right and binds the resulting value to the name on the left.
    13. 13Python KeywordsKeywords are reserved words such as if, for, def and return; they have special meaning and cannot be variable names.
    14. 14Input and OutputUse input() to read text from a user and print() to display values; convert input when you need numbers.
    15. 15IndentationIndentation groups statements into a block; Python conventionally uses four spaces per level.
    UNIT 02

    Data Types, Operators, Expressions & Data Structures

    Work with Python values, make decisions, repeat actions and organize collections.

    20 topics
    1. 01Data Types – Integers, Strings, BooleansIntegers represent whole numbers, strings represent text, and booleans represent True or False.
    2. 02Arithmetic OperatorsArithmetic operators perform calculations: +, -, *, /, //, %, and **.
    3. 03Comparison / Relational OperatorsComparison operators compare values and produce a boolean result: ==, !=, <, >, <= and >=.
    4. 04Assignment OperatorsAssignment operators update a variable; examples include +=, -=, *= and //=.
    5. 05Logical Operatorsand, or and not combine or invert boolean conditions.
    6. 06Bitwise OperatorsBitwise operators work on the binary bits of integers: &, |, ^, ~, << and >>.
    7. 07Membership Operatorsin and not in check whether a value occurs in a sequence or collection.
    8. 08Identity Operatorsis and is not check whether two names refer to the same object; use == to compare values.
    9. 09ExpressionsAn expression combines values, names and operators to calculate a result.
    10. 10Order of EvaluationPython follows operator precedence; parentheses make the intended order explicit.
    11. 11Control Flow – if, if-else, if-elif-elseConditional statements choose which block to execute based on a boolean condition.
    12. 12for LoopA for loop visits each item in an iterable, such as a list or range.
    13. 13while LoopA while loop repeats a block as long as its condition remains true.
    14. 14break, continue, passbreak exits a loop, continue skips to its next iteration, and pass is an empty placeholder statement.
    15. 15Lists – Operations, Slicing and MethodsLists are ordered, mutable collections; index, slice and use methods such as append, remove and sort.
    16. 16TuplesTuples are ordered collections that cannot be changed after creation.
    17. 17SetsSets store unique hashable values and provide efficient membership and set operations.
    18. 18DictionariesDictionaries map unique keys to values and are useful for records and fast lookups.
    19. 19SequencesSequences preserve order and support indexing, slicing and iteration; common examples are strings, lists and tuples.
    20. 20List ComprehensionsA list comprehension builds a new list from an iterable, optionally filtering items.
    UNIT 03

    Functions, OOP, Regular Expressions & Exceptions

    Package reusable logic, model real objects, match text and handle errors safely.

    22 topics
    1. 01Defining FunctionsA function is a named, reusable block created with def; it can accept inputs and return a result.
    2. 02Calling FunctionsCall a function by writing its name followed by parentheses and any required arguments.
    3. 03Passing ArgumentsArguments pass values into function parameters; Python supports positional and keyword forms.
    4. 04Keyword ArgumentsKeyword arguments name the parameter and make calls clearer; their order can differ from the definition.
    5. 05Default ArgumentsA default argument value is used when a caller does not provide that parameter.
    6. 06Variable-Length Arguments*args collects extra positional arguments and **kwargs collects extra named arguments.
    7. 07Anonymous Functions (Lambda)A lambda expression creates a small anonymous function, often used as a short key or callback.
    8. 08Scope of VariablesScope determines where a variable name can be accessed; local names belong to their function.
    9. 09Local and Global VariablesA local variable is created inside a function; global variables live at module level and should be changed sparingly.
    10. 10Object-Oriented DesignObject-oriented design models a system as objects with responsibilities, state and interactions.
    11. 11Design with ClassesA class defines the data and behavior shared by objects; each instance stores its own state.
    12. 12Programming TypesProgramming styles include procedural, object-oriented and functional approaches; choose based on the problem.
    13. 13Object-Oriented Programming (OOP)OOP organizes software around objects that combine state and methods, with encapsulation, inheritance and polymorphism.
    14. 14InheritanceInheritance lets a child class reuse or extend attributes and methods from a parent class.
    15. 15PolymorphismPolymorphism lets different object types respond to the same operation in their own way.
    16. 16Case Study – Request, Analysis, Design and ImplementationA case study turns a user request into requirements, a design, implementation and tests.
    17. 17Python Regular ExpressionsRegular expressions describe text patterns; Python's re module searches, validates and replaces matching text.
    18. 18Errors vs ExceptionsAn error is a problem in a program; an exception is a runtime event Python can raise and code can handle.
    19. 19Exception HandlingException handling catches expected failures and keeps a program in a controlled state.
    20. 20try-except BlockPut risky code in try and handle specific exception types in except; optional else and finally add follow-up behavior.
    21. 21Raising Exceptionsraise signals that a function cannot continue because an input or state violates its contract.
    22. 22User-Defined ExceptionsCreate a custom exception class when a domain-specific failure deserves a clear name.
    UNIT 04

    Database Interaction & Multithreading

    Persist application data in SQL databases and understand concurrent work with threads.

    11 topics
    1. 01Python Database InteractionDatabase interaction lets Python applications create, read, update and delete durable records.
    2. 02SQL Database Connection Using PythonA database connection provides a session for executing SQL and should be closed or managed safely.
    3. 03Creating TablesCREATE TABLE defines a table's columns, types and constraints before records are inserted.
    4. 04Searching TablesSELECT with WHERE filters records; parameter placeholders safely pass values into SQL.
    5. 05Reading Configuration Information from DatabaseRead saved settings with a query, then validate and convert their values before using them.
    6. 06Storing Configuration Information in DatabasePersist configuration as key-value rows and use parameterized INSERT or UPDATE statements.
    7. 07Programming Using Database ConnectionsUse a connection for related database work, commit successful writes and roll back failed transactions.
    8. 08Introduction to MultithreadingMultithreading runs multiple threads within one process and can keep I/O-bound programs responsive.
    9. 09Understanding ThreadsA thread is an execution path that shares its process memory with other threads.
    10. 10Thread SynchronizationSynchronization coordinates shared state so concurrent threads do not overwrite one another unexpectedly.
    11. 11Programming Using MultithreadingUse threads for independent I/O tasks, handle worker errors and coordinate completion with join or queues.
    UNIT 05

    Django Framework & NumPy

    Build a first mental model of Django web apps and NumPy's fast multidimensional arrays.

    12 topics
    1. 01Introduction to Django FrameworkDjango is a Python web framework with URL routing, views, templates, models and built-in development tools.
    2. 02Creating a Django ProjectA Django project holds site-wide settings and connects one or more applications.
    3. 03Creating a Django ApplicationA Django app is a reusable feature area with its own models, views, URLs and templates.
    4. 04Django URLsURL patterns map browser paths to view functions or class-based views.
    5. 05Django ModelsA Django model defines application data as a Python class and can create database tables through migrations.
    6. 06Django TemplatesTemplates combine HTML with dynamic context data using Django's template language.
    7. 07Django ViewsA view handles a request, performs application logic and returns a response such as rendered HTML or JSON.
    8. 08Introduction to Web DevelopmentWeb development connects a browser client, HTTP requests, server-side logic, data and a response.
    9. 09Introduction to PyCharmPyCharm is an integrated development environment for editing Python, running code and managing project tools.
    10. 10Introduction to NumPyNumPy provides efficient multidimensional arrays and vectorized numerical operations.
    11. 11Advantages of NumPy Arrays over Python ListsNumPy arrays use compact homogeneous data and vectorized operations that are usually faster for numerical workloads.
    12. 12Creating NumPy ArraysCreate NumPy arrays from Python sequences or helpers such as arange, zeros, ones and reshape.
    Made for curious learners · Hack The Future