Basics of Python programming
First of all, let’s review some of the key aspects of Python:
- It’s an interpreted language. Contrary to languages such as C or Java, it doesn’t need to be compiled, which allows us to run Python code interactively.
- It’s dynamically typed. The type of values is determined at runtime.
- It supports several programming paradigms: procedural, object-oriented, and functional programming.
This makes Python quite a versatile language, from simple automation scripts to complex data science projects.
Let’s now write and run some Python!
Running Python scripts
As we said, Python is an interpreted language. Hence, the simplest and quickest way to run some Python code is to launch an interactive shell. Just run the following command to start a session:
$ pythonPython 3.10.8 (main, Nov 8 2022, 08:55:03) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin Type "help", "...