.. meta:: :description lang=en: Advice to start learning Python :description lang=fr: Recommandation pour commencer à apprendre Python ################################## Advices to start learning Python ################################## To start learning Python, I recommend… ---------------------------------------- .. note:: Wait, what is Python? A very popular, free and open-source `programming language `_. Python is also multi-platform, simple to learn, write and read. #. 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. `Canopy (by Enthougt) `_ is another excellent one-click installer, see this video: .. raw:: html
#. To write and execute your Python program, the `Spyder `_ editor (with `IPython `_) is a truly 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. #. I also strongly recommend to try `Notebooks Jupyter `_ which gives a very nice web-based (in browser) interface to edit Python (among a hundred other languages). You can try here: ``_. #. You can use `DevDocs.io `_ to efficiently search for documentation, and `Zeal Docs `_ to have an access offline (without Internet). #. A more complete editor for Python is the industry-strong `PyCharm by JetBrains `_, less easy to manipulate and learn but PyCharm is very powerful! #. Other good editors include `Visual Studio Code `_ (my new favorite!), `Sublime Text `_, `GNU Emacs `_ or `vi/vim/gvim/neovim etc `_. Each have excellent support for Python (with all the features you could dream of), after installing a certain package or group of packages (or plugin or extensions, they have different names but the same meaning). .. seealso:: There exists dozen of good Python editors. A recent one is especially good for beginners is `Thonny `_ (as presented `in this article `_). #. 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. #. If you are new to programming or not familiar, you can use for free the awesome `PythonTutor.com `_ website to visualize your program and its execution. #. 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 : ``_. `This online course gives many details on how to learn using Python as a replacement for MATLAB `_ (on `RealPython.com `_). #. And if you want some examples of what Python can be used for, have a look to `my Python notebooks `_, or the notebooks by `Peter Norvig (pytudes) `_. #. A really good website to learn weekly tips about Python is the blog `Real Python `_. ------------------------------------------------------------------------------ .. seealso:: This other article is an excellent presentation about how to learn Python: `dataquest.io/blog/learn-python-the-right-way `_. .. seealso:: This `blog post `_ by `Philip Guo `_ is interesting also, as it explains why Python is a great programming language to start learning about programming and computer science. .. seealso:: These awesome lists also give very good advice, see `kirang89/pycrumbs `_, `svaksha/pythonidae `_, `vinta/awesome-python `_. .. note:: MATLAB is a trademark of MathWorks ®. And Python is awesome! .. (c) Lilian Besson, 2011-2021, https://bitbucket.org/lbesson/web-sphinx/