Syntax of Python Function

def functionname(parameters):
“””docstring”””
statement(s)
return [expression]

Example:
#!/usr/bin/python

# Function definition is here
def ima( lovestr ):
“This prints a passed string into this function”
print lovestr
return;

# Now you can call ima function
ima(“I’m fall in love!”)