Python Tutorial
Jakob Jenkov |
Python is a programming language created in 1991 which is now quite popular, and often used for tasks such as data science, command line scripting, web applications, AWS Lambdas etc. Python is an interpreted language and is thus typically not as fast as compiled languages such as C, C++, D, Java, C# etc. However, for many tasks Python is fast enough - and for many data science tasks the actual CPU intensive work is being done by C libraries that are plugged into Python inside the popular data science APIs.
This Python tutorial covers the core language elements of Python in a concise fashion, so you can get an overview of the Python programming language quickly.
Python Website
The official Python website is:
Installing Python
In order to run Python programs you must first install a Python interpreter. This is also often referred to as a Python runtime. You can download the official Python runtime from the Python website (see previous section for a link).
It is also possible to run Python using GraalVM. GraalVM is a virtual machine capable of running several different programming languages - even at the same time within the same application. I have written more about GraalVM here in my GraalVM tutorial.
Running Python
Once you have a Python runtime installed, you can run a Python script simply by executing the python
command from the command line, passing the file path to the Python script to run as argument.
Here is how running a Python script from the command line looks like using a Python runtime:
python myapp.py
Python Topics
This Python tutorial covers the following Python topics:
- Python Variables
- Python Data Types
- Python if statements
- Python for loops
- Python while loops
- Python functions
Other Programming Languages
There are many other popular programming languages than Python. I am writing tutorials about a few of them. Here are the programming languages I am writing tutorials about:
Tweet | |
Jakob Jenkov |