Learning Python
- 3 minsAt the Begin of May I decided to extend my programming language toolbox by learning Python. The Coursera Python Specialization by University of Michigan made a great first impression to learn the basics of Python.
In about three weeks I’ve learnt the difference between Lists, Tuples, and Dictionaries. In the final part of the course had the goal to design and create your own python application for data retrieval, processing, and visualization. A capstone project that allows to use the new gained knowledge in a real world case.
My three takeaways
- Indentation is key and the most distinctive features of Python to indent blocks of code.
- Debugging tools and methods are essential and should be included at the beginning of every programming language course.
- Python is a very powerful language (easy to learn, user-friendly, widely used, runs on (almost) any platform) that paves the way for new, exciting directions to explorer, especially via all the scientific libraries.
One important part I was missing in the course was how you actually debug or trace a error. After looking around on Google and StackOverflow I found a very useful debugging tool called Python debugger pdb. This debugger is equivalent to Ruby’s byebug and easy to use.
It is essential to learn how to debug/trace errors right at the beginning when diving into a new programming language. It helps to understand what is going on, how the nature of the language works, and will make your life way easier to understand the bigger picture.
Run a python script from the command line by using the Python debugger:
Import the Python debugger at the top of the file:
Set the breaking point anywhere in your file by:
Read more about how to become a pdb-power user on Medium.
This course has sparked the curiosity in me to use Python to explore and extent my knowledge further in building.
You can find the my capstone project on Github.
One fun eater egg for the end
Type following in your Python console.
You can read those aphorisms up on the official Python website.