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:
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: https://jupyter.org/try.
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).
Voir aussi
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 : https://scipy-lectures.github.io/. 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.
Voir aussi
This other article is an excellent presentation about how to learn Python: dataquest.io/blog/learn-python-the-right-way.
Voir aussi
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.
Voir aussi
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!