Functions

A function is a block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing.
def functionname( parameters ):
   "function_docstring"
   function_suite
   return [expression]
#!/usr/bin/python3

# Function definition is here
def printme( str ):
   "keen infotect"
   print (str)
   return

# Now you can call printme function
printme()

Comments

Popular posts from this blog

What Is Python

Numbers

Date and Time