[Tutor] Program for outputing the letter backward

John Fouhy john at fouhy.net
Wed Mar 29 07:32:15 CEST 2006


On 29/03/06, Hoffmann <oasf2004 at yahoo.com> wrote:
> >>> vehicle='car'
> >>> index = 0
> >>> lenght =len(vehicle)
> >>> last = vehicle[lenght -1]
> >>> while last >= vehicle[0]:
> ...      letter = vehicle[index]
> ...      print letter
> ...      last -= 1
> ...

What is vehicle[index] ?

What if I change index, say,

   index = index + 1

Now what is vehicle[index] ?

--
John.


More information about the Tutor mailing list