
Python 2 and Python 3 come pre-installed on Raspbian operating systems, but to install Python on another Linux OS or to update it, simply run one of these commands at the command prompt: We’ll only cover the basics of writing and executing a Python program here, but a great tutorial covering everything a programmer needs to know about Python is the book Learning Python 5th Ed. Python is generally slower at computations than C, but its ease of use makes Python an ideal language for prototyping programs and designing applications that aren’t computationally intensive.

Many (but not all) of the things you can do in C can be done in Python. There are libraries for everything you can think of – game programming, rendering graphics, GUI interfaces, web frameworks, and scientific computing. Python also has a large collection of libraries, which speeds up the development process. For example, you can use Python to program things like: However, there are more useful things you can do with Python. It can be used just like a command line with IDLE, Python’s REPL (read, eval, print, loop) function.

Like shell scripts, Python can automate tasks like batch renaming and moving large amounts of files.

BONUS: Download the Raspberry Pi programming cheat sheet – a one page PDF guide with instructions on how to create and execute C programs, Python programs, and Shell scripts.
