Python, you pedantic bastard!

Let’s talk Python for a bit. I just started learning how to program in Python, oh the fun! I find it really easy to read out, but don’t underestimate it ferocity, it’s like a looming anaconda, asleep though.

The syntax is really easy to grasp but you have to be mindful of indetation. Oh my, the indentation! You need to be extremely dexterous when handling Python. Since Python doesn’t have any curly braces {}, its form of encapsulation is indentation. This tells Python when a block of code should end and what its parent statement is, as in the case of a function.

Let’s stop blabbing about…

This is what I mean by indentation

def hello():
    print "Hello, World!"

In another instance

def isBigger(x,y):
    if x > y:
        print x
        print y

notice the position of the print word and the if statement. Either use four spacebar tabs or one Tab stop as convention, but for now may the code be with you!

Written on July 13, 2016