[Tutor] slicing a string

Sandip Bhattacharya sandipb at foss-community.com
Thu Sep 9 08:19:46 CEST 2010


On Thu, Sep 9, 2010 at 11:34 AM, Evert Rol <evert.rol at gmail.com> wrote:
> Read
> http://docs.python.org/library/stdtypes.html#sequence-types-str-unicode-list-tuple-buffer-xrange
> , note 5 (about one "page" down), which explicitly says "If i or j are
> omitted or None, they become “end” values (which end depends on the
> sign of k)", where the important bit for this discussion is actually
> between parentheses.

Great! That is exactly what I needed to know. The reference I learnt
extended slices from, probably didn't include this subtlety.

Thanks,
 Sandip


More information about the Tutor mailing list