[Tutor] Useing Functions
Kent Johnson
kent_johnson at skillsoft.com
Fri Aug 20 17:05:01 CEST 2004
Yes. Definitely. If you have repeated code, putting it in a function is
usually a good choice. It reduces duplication, makes the rest of the code
easier to read and makes it easy to change the (no longer) repeated code if
necessary.
Kent
At 10:16 AM 8/20/2004 -0400, Kevin wrote:
>Is it better to put everything in a def function, so that instead of
>having to rewrite it all out over and over youc an just reuse the
>function? ie: a def function that asks if you would like to conitue and to
>answer yes or no. so that you can use it many times if you need to?
>
>Thanks
>Kevin
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system
>(<http://www.grisoft.com>http://www.grisoft.com).
>Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/04
>_______________________________________________
>Tutor maillist - Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list