On 27/09/11 19:32, c smith wrote:
i understand the general idea of recursion and if I am following well
written code I can understand how it works, but when I try to write it
for myself I get a bit confused with the flow.

Others have dealt with the specifics.

If you really want to learn how to use and write recursive code there is (IMHO!) no better place to go than the online book How To Design Programs. It's written using Scheme but the code is clear enough that you should translate to Python easily. You probably only need to read the first 4 chapters or so. The author builds up a set of heuristics for defining recursive solutions - i.e. writing functions!

http://www.htdp.org

Enjoy,

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to