[Tutor] Recursion always returns None

Steve Willoughby steve at alchemy.com
Tue Aug 28 18:31:45 CEST 2012


On 28-Aug-12 09:03, Mark Lawrence wrote:
> On 28/08/2012 16:51, Dharmit Shah wrote:
>>
>> @ Steve : Thank you. As suggested by Dave Angel, I am going to try the
>> loop. And even before implementing it, I can feel that it's going to
>> be more efficient than recursion.
>>
>
> May I ask why you appear to be concerned with efficiency for a hangman
> game?

Not the game per se, but if you're searching a file of thousands of 
words one at a time, randomly picking words and recursing if they're not 
what you intended, the hit--worst case--could be catastrophic.


-- 
Steve Willoughby / steve at alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C


More information about the Tutor mailing list