Skip to content
UPEEC

Python

A readable, batteries-included language used for automation, data science, web back-ends and even microcontrollers (MicroPython).

Beginner
Comments 0

Python is famous for clean syntax and a huge library ecosystem. Engineers use it to automate measurements, analyse data, talk to hardware over serial ports, and program boards like the ESP32 and Raspberry Pi Pico with MicroPython.

Key traits: dynamically typed, interpreted (CPython compiles to bytecode, then runs it), uses indentation to define blocks, and "everything is an object".

Sub-topics (10)

Getting Started with Python

Install Python, run code in the interactive shell or as a script, and learn why indentation matters.

Beginner♥ 0🔖 0💬 0

Python Data Types

Python's built-in types: numbers, strings, booleans and None.

Beginner♥ 0🔖 0💬 0

Python Data Structures

Lists, tuples, dictionaries and sets — and comprehensions to build them concisely.

Beginner♥ 0🔖 0💬 0

Python Control Flow

if/elif/else, for and while loops, and the match statement in Python.

Beginner♥ 0🔖 0💬 0

Python Functions

Defining functions in Python: default and keyword arguments, *args/**kwargs, lambdas, decorators and generators.

Easy♥ 0🔖 0💬 0

Object-Oriented Python

Model real things as classes with data (attributes) and behaviour (methods).

Easy♥ 0🔖 0💬 0

Files and Exceptions

Read and write files safely, and handle errors with try/except.

Beginner♥ 0🔖 0💬 0

Modules and Packages

Split code into files (modules) and folders (packages), and import what you need.

Beginner♥ 0🔖 0💬 0

Python for Hardware

Use Python to talk to microcontrollers over serial, and to program boards directly with MicroPython.

Easy♥ 0🔖 0💬 0

Python Libraries

NumPy and Matplotlib: fast numerical arrays and plotting for engineering data.

Easy♥ 0🔖 0💬 0

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.