Skip to content

Python programming

Learn Python from your first program to clean, idiomatic code, automate everyday tasks, manage packages and take your first steps into data science.

Beginner 12 steps

Steps

Getting started

  1. Install and run PythonInstall Python, run the interactive interpreter and execute your first script so you can experiment with every concept that follows.
    • Python Insider python.orgfree

      Official releases, core developer discussions, and steering council updates from the Python development community.

    • Python Documentation docs.python.orgfree

      Official documentation for the Python language, including the tutorial, language reference, standard library reference and platform-specific usage guides.

  2. Variables, types and control flowLearn variables, strings, numbers, conditions and loops, the building blocks every Python program is made of.
    • Python for Everybody py4e.comfree

      Free beginner course and open textbook teaching programming with Python, data structures, web data and databases.

    • The Python Tutorial docs.python.orgfree

      The official introduction to Python, covering syntax, data structures, modules, errors and classes for new programmers.

  3. Functions, data structures and filesOrganise code into functions and modules, work with lists and dictionaries, and read and write files on disk.
    • The Python Tutorial docs.python.orgfree

      The official introduction to Python, covering syntax, data structures, modules, errors and classes for new programmers.

    • Python for Everybody py4e.comfree

      Free beginner course and open textbook teaching programming with Python, data structures, web data and databases.

Writing good Python

  1. Code style with PEP 8Follow the official naming, layout and formatting conventions so your code is easy for others, and yourself, to read later.
  2. The standard libraryExplore the modules that ship with Python, from dates and paths to JSON and regular expressions, before reaching for extra packages.
    • Python Documentation docs.python.orgfree

      Official documentation for the Python language, including the tutorial, language reference, standard library reference and platform-specific usage guides.

  3. Shell and version control (optional)Get comfortable with the terminal and Git so you can run scripts, track changes and share your projects.

Practical projects

  1. Automate everyday tasksWrite small programs that rename files, fill spreadsheets, scrape web pages and send emails, turning concepts into useful tools.
    • Automate the Boring Stuff with Python automatetheboringstuff.comfree

      Free online book that teaches Python through practical automation of files, spreadsheets, web pages and everyday tasks.

  2. Packages and virtual environmentsInstall third-party libraries with pip inside isolated virtual environments so each project keeps its own dependencies.
    • Python Packaging User Guide packaging.python.orgfree

      Official guide to installing, building and distributing Python packages, covering virtual environments, pip, project metadata and publishing to the package index.

    • pip pip.pypa.iofree

      Standard package installer for Python, used to install and manage libraries from the Python Package Index and other sources, with full user documentation.

    • PyPI - The Python Package Index pypi.orgfree

      Official repository database for third-party software and packages developed for the Python programming language.

  3. Publish your own package (optional)Structure a project, describe its metadata and build a distribution so others can install your code from the package index.
    • Python Packaging User Guide packaging.python.orgfree

      Official guide to installing, building and distributing Python packages, covering virtual environments, pip, project metadata and publishing to the package index.

    • PyPI - The Python Package Index pypi.orgfree

      Official repository database for third-party software and packages developed for the Python programming language.

Into data science

  1. Practise with real datasetsLoad public datasets and answer simple questions with Python, building the habit of exploring data before modelling it.
    • Kaggle Datasets kaggle.comfree

      Community platform offering thousands of open datasets, code notebooks, and benchmarks across business analytics and predictive modeling.

    • UCI Machine Learning Repository archive.ics.uci.edufree

      A prominent academic archive providing benchmark empirical datasets for evaluating predictive and classification algorithms.

  2. Machine learning with scikit-learnTrain and evaluate classic models such as regression and decision trees with a consistent, well-documented Python library.
    • scikit-learn scikit-learn.orgfree

      A Python library featuring efficient tools for predictive data analysis, classification, regression, and clustering.

    • fast.ai fast.aifree

      A research and educational organization providing free, practical courses on deep learning and applied data science.

  3. Follow the language (optional)Keep up with new Python releases and core development news to learn features as they arrive in the language.
    • Python Insider python.orgfree

      Official releases, core developer discussions, and steering council updates from the Python development community.

See also

External links, by their respective authors. This path is original IPL content.