Re: Reversing a string

2007-07-05 Thread Martin Durkin
[EMAIL PROTECTED] (Alex Martelli) wrote in news:[EMAIL PROTECTED]: > Aahz <[EMAIL PROTECTED]> wrote: >> I would agree with people who claim >> that you should memorize most of the built-in functions (which is >> precisely why there is a high barrier to adding more built-in >> functions). > > I

Re: Reversing a string

2007-07-01 Thread Martin Durkin
[EMAIL PROTECTED] (Alex Martelli) wrote in news:[EMAIL PROTECTED]: > Martin Durkin <[EMAIL PROTECTED]> wrote: >... >> >>>>>> def rev(x): >> >>> mylist = [] >> >>> for char in x: >> &g

Re: Reversing a string

2007-07-01 Thread Martin Durkin
Duncan Booth <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Martin Durkin <[EMAIL PROTECTED]> wrote: > >>>>>> def rev(x): >>> mylist = [] >>> for char in x: >>> mylist.append(char)

Re: Reversing a string

2007-06-30 Thread Martin Durkin
ptn <[EMAIL PROTECTED]> wrote in news:1182997438.541012.54100 @o61g2000hsh.googlegroups.com: > def rev(x): > mylist = [] > for char in x: > mylist.append(char) > mylist.reverse() > for letter in mylist: > print