Learning and exploring Python

Learning and exploring Python

Are you new to programming and want to learn Python from scratch? Maybe you are already a developer and just improve your Python skills? The Web offers many resources that are both free and high-quality.  In this article we’ll give a rundown of some of best.

Codecademy.com’s Python course

Due to its start-from-zero approach, absolute beginners to Python (and programming in general) will  benefit the most from Codecademy’s interactive Python course. This course covers a lot of ground, from programming basics like mathematical operations and while loops, to more advanced lessons in  bitshifting binary numbers and extending object classes. The course itself teaches Python 3 mainly through a simple text editor and Python interpreter through your browser, supplemented by quizzes and accompanying lesson-specific explanatory text. When your code throws errors,  a helpful hint is almost always displayed with the actual interpreter error message. For the times when you are really stuck, solutions are easily found online from others who have completed the course.

As stated earlier, this course covers a lot of the Python language, just as well since Codecademy only has one Python course, compared to four for Javascript (one for the language itself, another for AngularJS and two for ReactJS). At the time of this writing, Codecademy was in the middle of updating many of their programming courses, Python being one of them. The new Python course is scheduled to go live in the first few months of 2017, so if you have not yet started this course, it’s probably worth holding out to start the updated course.

Perhaps the greatest value of Codecademy’s Python course to experienced programmers coming from other languages is teaching developers the “Python way” of doing common programming tasks like file I/O or string manipulation. These developers will also learn the subtle differences between the Python standard data types and their rough equivalents in other languages.

The Official Documentation from Python.org

Python’s documentation is awesome. Seriously, one of the best articles about software documentation and technical communication in general is from a member of the Django documentation team.

The helpful documentation and links which accompany each release are most useful, however after completing a Python tutorial or course like Codecademy’s.  For example, the official tutorial is more like a travel guide than a detailed tutorial because its emphasis tends to be more on explanation and example code rather than teaching how to code.  There is a lot of useful information there, much of it  overlaps with the Codecademy course (great for concept reinforcement!) and it gets updated with each release, so make this the first stop after you complete your first Python tutorial or online course.

Perhaps the most valuable resource for Python programmers in the official documentation is the Library Reference for all the modules which are included with Python. This is great for answering all those “How do I do X in Python?” questions.  The table of contents is logically organized, consisting mostly of a listing of the included modules with each module having a one-line description telling you what problem that particular module solves.  Clicking the that module’s name or description brings you to the module’s documentation which then tells you how you should solve that problem. There are also a few sections on the standard data types, exceptions and other topics.

Learning from Others

One of the best ways to become a better programmer is to study other people’s code. In our first post we’ve mentioned how both the Raspberry PI mini computer and the Maker movement both employ Python. In fact, almost every issue of the official Raspberry Pi magazine, The Magpi, features code written by other enthusiasts and shared freely with the rest of the community.  Not only is much of this code written in Python, but a lot of this code requires little or no modification to run PC’s, servers or even Macs. Reading source code to better understand it and then modifying that code for your own needs is the most active and engaging way of really learning to program.

Speaking of hardware, the Maker movement and Python, adafruit industries has a great series on learning MicroPython, and is definitely worth diving in if our previous article on Python and the Internet of Things piqued your interest in MicroPython.  Adafruit also features plenty of other learning resources for using Python in conjunction with many of the products they sell, from the BeagleBlack single board computer to digital temperature sensors.

Python is a powerful language with a growing, supportive community around it.  The are many others like you learning the language, and helping others learn.  Together, we’re helping one another build amazing stuff with Python.

What are you going to make with Python?

Copyright © Python People