Advices to start learning Python

To start learning Python, I recommend...

Note

Wait, what is Python?

A very popular, free and open-source programing language. Python is also multi-platform, simple to learn, write and read.

  1. The Anaconda installer, which basically allow you to install "everything" need to work with Python, in one click (you just have to download one big file, almost 400 Mo, and it's free), on Windows, Linux or Mac OS.
  2. To write and execute your Python program, the Spyder editor (with IPython) is a trully brilliant software. Especially to use Python for numerical computation or scientific programming. The user interface is really similar to the one offered by Matlab or Octave (program on the left, output on the right, one big green button to click to execute the program etc), and the entire software is extremely well designed and written. Only the help research tool is (slightly) less efficient than the one provided in Matlab, but everything else seems (objectively) as good or better in Spyder than in Matlab. And a simple Internet request (with DuckDuckGo of course, and not Gouuugle) works really fine in general.
  3. In order to learn Python, the fundamentals are well taught here (and in the next pages). Do not worry, if you already have some programming experience, the syntax and concepts in Python are quite similar to other languages, you will learn easily.
  4. To use Python for « numerical science », the de facto standard is the combination of NumPy/SciPy and MatPlotLib. All these packages (also called modules) are installed by default with Anaconda, and is fully functional right out-of-the-box after having installed Python. This good tutorial explains how to start using NumPy/SciPy, and another one teach how to use MatPlotLib for scientific plotting (was written by two French professor of the Labri !). The page "NumPy for Matlab Users" can be extremely useful if you already know MatLab. Finally, this free e-book ("Python Scientific Lecture Notes") is an excellent reference : https://scipy-lectures.github.io/.
  5. And if you want some examples of what Python can be used for, I wrote about 60 examples here bitbucket.org/lbesson/python-demos, which cover now various domains, from image analysis, statistical machine learning, numerical computations (like solving a non-linear PDE), plotting, linear algebra, symbolic computation (with SymPy), bits of simple algorithms and more!

Note

Matlab is a trademark of MathWorks. And Python is awesome!