You can find Part 1 here.
In this part of the series we are going to cover the very basics of Python. You may be asking: “Its Python, how hard can it get ? Its just sudo code” well that is both true and false to a degree.
Python is a dynamically typed language, however it is strongly typed. This just means that you can set a variable to any sort of data type you want without declaring it first. However it doesn’t implicitly convert types for you.
Python also contains different types array like structures. And they are all get dynamically sized of course. You have Lists and Dictionaries, they all work the way you intuitively think do, coming from another programming language. The only new sort of collection type, you will encounter is the Tuple. A Tuple is pretty much the same thing as a List however they are immutable and can not contain repeats of the same value.
It’s pretty basic.
Python does not find “for” loops pythonic that is way it favors “For In” loops instead. maybe asking: “What if I just want to print something 3 times ? do I have to make a list with three elements ?” The answer is no, you can use a “generator” shown in the gists below. Python also has something called “list comprehension” its very nifty to write compact and concise code.
You can go here to find all the relevant code, in order.