Released · improving
Programming language · Since 1991
Python is a readable, general-purpose language with a large standard library, widely used for automation, web backends, data analysis and machine learning.
Python is a general-purpose programming language created by Guido van Rossum and first released in 1991. It uses indentation to mark code blocks and favors plain, readable syntax, so programs often look close to pseudocode. Code is run by an interpreter, which makes it easy to try ideas interactively and see results right away.
Python shines where development speed and a rich ecosystem matter more than raw performance: scripting and automation, web services, data analysis, scientific computing and machine learning. Its standard library covers files, networking, text processing and much more, and hundreds of thousands of third-party packages are available on PyPI. Performance-critical parts are often handled by libraries written in C or other compiled languages.
To get started, install Python 3, open the interactive prompt and work through the official tutorial. Learn early on to create a virtual environment for each project and to install packages with pip, then move on to the standard library reference and to writing tests.
Indentation defines blocks, and the language favors one clear way of doing things, which keeps code easy to read and review.
The standard library ships modules for files, JSON, HTTP, regular expressions, dates, testing and more, so many tasks need no extra packages.
Variables need no declared types, and optional type hints let editors and tools such as mypy catch mistakes before the code runs.
PyPI hosts a huge range of packages, from web frameworks like Django and Flask to data tools like NumPy and pandas.
On Windows and macOS, use the installer from python.org; on Linux, use your distribution's package manager. Then check the version in a terminal (on Windows, run py --version).
python3 --versionGive each project its own environment so its packages stay isolated. On Windows, create it with py -m venv .venv and activate it with .venv\Scripts\activate; on macOS and Linux, activate it with source .venv/bin/activate.
python3 -m venv .venvOnce the environment is active, python points to it on every platform. Install packages from PyPI with pip and list them in requirements.txt when you share the project.
python -m pip install requestsprint() writes its argument to standard output. Save this line as hello.py and run it with python3 hello.py (on Windows, py hello.py) to see Hello, world!. There is no main function and no compile step: the interpreter runs the file from top to bottom.
hello.py
print("Hello, world!")
python3 hello.pySix chapters that take you from installation to the core ideas of Python.
Ask questions, share experience and trade opinions about Python.
No discussions yet. Start the first one.
0 comments
Sign in · Sign in to leave a comment.
Be the first to comment.