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

SourceForge.net noreply at sourceforge.net
Sat Aug 21 22:03:40 CEST 2004


Bugs item #1013239, was opened at 2004-08-20 21:29
Message generated for change (Comment added) made by elsiebeth
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: Elizibeth Thompson (elsiebeth)
Date: 2004-08-21 15:03

Message:
Logged In: YES 
user_id=914980

Sorry 'bout that. :)

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

Comment By: Hye-Shik Chang (perky)
Date: 2004-08-20 23: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