Re: print out each letter of a word

2006-04-27 Thread Peter Otten
Gary Wessle wrote: > I am going through this tut from > http://ibiblio.org/obp/thinkCS/python/english/chap07.htm > > I am getting errors running those 2 groups as below as is from the tut Next time, please copy and paste the complete "traceback", the error messages that clutter your screen when

Re: print out each letter of a word

2006-04-27 Thread vbgunz
what errors are you getting? Could it be an indentation error? I don't see anything wrong with the script except the value of fruit is missing. if fruit is a string, it should work like a charm. double check the length of the fruit with print len(fruit) and check fruit with print type(fruit) and ma

print out each letter of a word

2006-04-27 Thread Gary Wessle
I am going through this tut from http://ibiblio.org/obp/thinkCS/python/english/chap07.htm I am getting errors running those 2 groups as below as is from the tut thanks index = 0 while index < len(fruit): letter = fruit[index] print letter index = index + 1 or for char in fruit: