A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/102315.html below:

Stepping backwards in for loop?

Stepping backwards in for loop? Stepping backwards in for loop?Andrew Dalke dalke at acm.org
Sat Apr 14 19:53:49 EDT 2001
Carlos Ribeiro wrote:
>It would be a *lot* easier if strings had a reverse method, or if the
>reverse() methods returned the reversed string. However, similarly to
>sort(), the Python-way-of-doing-things must have some good reason for
>reverse() to behave this way (as a inplace operation on the list).

Lists have a reverse method because lists are mutable.
Consider strings as more akin to tuples.  Both are immutable.

                    Andrew
                    dalke at acm.org




More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4