[Tutor] while loop only executes once
Brett Kelly
inkedmn@gmx.net
Wed, 19 Dec 2001 05:31:18 +0100 (MET)
ok, here's my loop. it only goes through once and exits.
(words is a dictionary with each letter of the alphabet corresponding to a
different word)
name = raw_input("Please enter your name: ")
name.lower()
for i in range(0, len(name)):
letter = name[i]
while len(name) > 0:
print words[letter]
name[i] = name[1:]
i can't figure this out!!!
please help, thanks!
Brett
--
Sent through GMX FreeMail - http://www.gmx.net