[ python-Bugs-1013239 ] Python Tutorial 3.1.4 List example

SourceForge.net noreply at sourceforge.net
Sat Aug 21 06:28:37 CEST 2004


Bugs item #1013239, was opened at 2004-08-21 11:29
Message generated for change (Comment added) made by perky
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1013239&group_id=5470

Category: Documentation
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 1
Submitted By: Elizibeth Thompson (elsiebeth)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python Tutorial 3.1.4 List example

Initial Comment:
In chapter 3.1.4, there is an example of making and
using a list.  One of the examples is:

>>> a = ['spam', 'eggs', 100, 1234]

>>> a[1:-1]
['eggs', 100]

I didn't type this into Python, but I think that it
should be:

>>> a[1:-1]
['eggs', 1234]

Thanks.

----------------------------------------------------------------------

>Comment By: Hye-Shik Chang (perky)
Date: 2004-08-21 13:28

Message:
Logged In: YES 
user_id=55188

No. ['eggs', 100] is correct.
[1:-1] means not 1 and -1 but from 1 to -1.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1013239&group_id=5470


More information about the Python-bugs-list mailing list