Functions
eharetea

Creating a basic function in Python.

Basic functions in Python.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Friday August 01st, 2008 01:21 AM

# functions

def parseme(a,b,c):
       print a,b,c

parseme(1,2,3)
1 2 3

>>> def newvar():
...     import os
...     folders = []
...     thepath = os.path.abspath('.')
...     newpath = thepath.replace('/',' ')
...     print 'newpath: ',newpath
...
>>> newvar()
newpath:   usr home dlynch