'''strings4.py Jeff Ondich, 2 April 2009 This sample program will introduce you to "iteration" or "looping" over the characters in a string. ''' s = 'two kudus and a newt' # What happens here? for ch in s: print ch print # And here? k = 0 while k < len(s): print s[k] k = k + 1 print # Can you make sense of these structures? Let's talk about # them on Monday. (You may find that the second section above # can be modified nicely to do one of the hard parts of your # homework--printing a string backwards.)