Defining a function in python
Python function definitions are simple. Defining a function in python is very similar to many other languages out there. Lets try it out:
def hello(x) :
print "Hello", x
Output is as follows
Notice we used print with a comma. This allows concatenation of strings in a single line statement.
An interesting property of functions in python is that you are able to assign them to variables.
variable1 = hello # assigns the variable "variable1" to the function we created above "hello"
That is all for now. Thanks and please add comments.