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:
$ python Python 3.7.10 (default, Mar 7 2021, 10:12:14) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright"...