[Tutor] Help needed

Alan Gauld alan.gauld at btinternet.com
Wed Jun 17 02:41:50 CEST 2009


<christopher.henk at allisontransmission.com> wrote

>>>> mystring="Mary had a little lamb."
>>>> mystring.split()
> ['Mary', 'had', 'a', 'little', 'lamb.']
>>>>
>
> And then you can use slicing to reverse the created list the same way you
> did with the full string.

Or use the reverse() method of the list...

Alan G 




More information about the Tutor mailing list