Python ‘function’ explained

May 1, 2013
programming python

A function is a block of reusable code that performs a single action. Functions enable applications to be modular.

Python provides many built-in functions like print(). You can also create your own functions. These are called user-defined functions.

To create a function in Python start with the keyword def followed by the function name and parentheses (). Input parameters should go within the parentheses. The code block starts with : and codes are indented. The code block ends with a return statement.

#!/usr/bin/env python

# This is a function example
# Here we define the function
def printThis(str):
        print str

# We can now call the function
printThis("I want to print this text")

Functional Programming by Renghen

May 28, 2017
programming meetup mauritius-software-craftsmanship-community

braincheck() perl script

March 4, 2014
linux programming

Visual Studio 2013 virtual launch

November 19, 2013
windows programming user-groups-mauritius journal microsoft