Python Fundamentals
Python is a general-purpose programming language built around readable source code, dynamic objects, functions, modules, and a large standard library. It is widely used for automation, web services, data work, scientific computing, and machine learning.
itProgramming languages | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — Python Fundamentals
Python is a general-purpose language for making a sequence of statements and expressions change the state of objects. The useful mental picture is not a row of labelled boxes. A name refers to an object, and more than one name can refer to the same one. This explains the famous moment when a list changes somewhere else in the program. The list did not develop ambitions; another reference reached it.
The next surviving idea is mutation versus rebinding. Appending to a list changes one existing object, so every name that refers to it sees the change. Assigning a new list changes only that name's binding. Collections make those choices visible: lists keep ordered mutable items, tuples keep fixed groupings, dictionaries map keys to values, and sets represent unique members. Pick the one whose invariant says what the program is trying to preserve.
Functions keep that state from wandering around the building. A function takes parameters, does local work, and returns a value or produces an explicit side effect. Exceptions mark the route where normal execution cannot continue. Catch the narrow failure you can handle, then let unrelated errors keep their useful context. A context manager performs the equally unglamorous but vital job of pairing setup with cleanup. Files, locks, and temporary resources all appreciate being left in a known state.
Projects add modules, packages, tests, and a virtual environment, which isolates installed distributions for one project. The language includes a large standard library, but third-party packages arrive separately. An import package and an installable distribution can even have different names, because the universe enjoys a small paperwork puzzle.
For the full map, read the Intro first; it connects objects, control flow, functions, errors, classes, and iteration. Use Slides when the relationships need a compact view. Keep the Cheatsheet nearby while writing code, especially for equality, scope, exceptions, and environment boundaries. The practice reference then turns those concepts into a repeatable way to inspect state, and the exercise asks them to cooperate in one small report.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://docs.python.org/3/tutorial/
Supports
- Expressions, control flow, functions, data structures, modules, files, and exceptions
- Classes, scopes, iterators, generators, and standard-library orientation
- https://docs.python.org/3/library/stdtypes.html
Supports
- Truth testing, numeric types, sequences, text, bytes, sets, and mappings
- Core operations, mutability behavior, iteration, and context-manager types
- https://docs.python.org/3/reference/executionmodel.html
Supports
- Names, binding, code blocks, scopes, namespaces, and exception execution
- Language execution model distinct from implementation details
- https://docs.python.org/3/tutorial/errors.html
Supports
- Exception raising, handling, else, finally, cleanup, and user-defined exceptions
- https://peps.python.org/pep-0008/
Supports
- Python code layout, indentation, imports, naming, comments, comparisons, and public interfaces
- https://packaging.python.org/en/latest/tutorials/installing-packages/
Supports
- Virtual environments and isolated package installation
- Project package isolation and package-management terminology
- https://docs.python.org/3/license.html
Supports
- Python history and the early-1990s origin used by the timeline.
- https://peps.python.org/pep-0001/
Supports
- The Python Enhancement Proposal process and its 2000 introduction.
- https://docs.python.org/release/2.0/whatsnew/
Supports
- Python 2.0 language and runtime changes used by the timeline.
- https://docs.python.org/3.0/whatsnew/3.0.html
Supports
- Python 3.0 compatibility break and migration context used by the timeline.
- https://docs.python.org/3.5/whatsnew/3.5.html
Supports
- Python 3.5 async and await syntax milestone.
- https://docs.python.org/3.8/whatsnew/3.8.html
Supports
- Python 3.8 assignment-expression milestone.
- https://docs.python.org/3.10/whatsnew/3.10.html
Supports
- Python 3.10 structural pattern matching milestone.
- https://docs.python.org/3/whatsnew/3.11.html
Supports
- Python 3.11 traceback-location and performance milestones.
- https://www.python.org/about/legal/
Supports
- CPython and standard-library licensing classification in the Landscape.
- https://www.jetbrains.com/pycharm/
Supports
- PyCharm as a Python development environment in the Landscape.
- https://jupyter.org/
Supports
- JupyterLab as an interactive Python development environment in the Landscape.
- https://docs.spyder-ide.org/current/faq.html
Supports
- Spyder availability and licensing in the Landscape.
- https://thonny.org/
Supports
- Thonny features and availability in the Landscape.
- https://nedbatchelder.com/text/names1/names1.html
Supports
- Practitioner explanation of Python names, values, references, and mutation for Field Notes.
- https://consideratecode.com/2018/10/17/how-not-to-handle-an-exception-in-python/
Supports
- Practitioner analysis of overly broad exception handling for Field Notes.
