Subroutine Equivalent in Python (newbie Q)

binnc at my-deja.com binnc at my-deja.com
Thu Feb 1 14:02:01 EST 2001


Hello,

Another question from someone totally new to
Python. Is there an equivalent in Python to a sub-
routine, (e.g. gosub and return).  I want to
create a modular program with sub-routines to
perform distinct tasks wihin the program for
organizational and debugging purposes, etc.  Is
the only (or best) way to do this is with
modules?  A function works but the values
obtained within the function do not appear to be
valid outside of that function.  I guess I am
looking for the best approach to create the
subroutines for execution from the main flow of
the program.

Thanks for any assistance!


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list