Re: Newcomer to Python tutorial question

2009-05-08 Thread Steven D'Aprano
On Thu, 07 May 2009 11:40:57 -0700, Chris Rebert wrote: >> why is the printed result of >> > basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} > print(basket) >> {'orange', 'banana', 'pear', 'apple'} >> >> in the sequence given? > > Because it's *not a sequence* at all, it

Re: Newcomer to Python tutorial question

2009-05-08 Thread Peter Pearson
On Fri, 8 May 2009 10:16:55 +0100, Alan Cameron wrote: [snip] > > In particular reference to the tutorial section > http://docs.python.org/3.0/tutorial/datastructures.html#nested-list-comprehensions > > There is a word which is ambiguous, at least to me. > > Perhaps you can explain the use of the

Re: Newcomer to Python tutorial question

2009-05-08 Thread Alan Cameron
"Terry Reedy" wrote in message news:mailman.5248.1241732704.11746.python-l...@python.org... > Alan Cameron wrote: >> > why is the printed result of > basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} print(basket) > {'orange', 'banana', 'pear', 'apple

Re: Newcomer to Python tutorial question

2009-05-07 Thread Terry Reedy
Alan Cameron wrote: why is the printed result of basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} print(basket) {'orange', 'banana', 'pear', 'apple'} in the sequence given? It appears that I used a reserved term when I used 'sequence'. No and Sort-of. No: We often use

Re: Newcomer to Python tutorial question

2009-05-07 Thread Peter Otten
Alan Cameron wrote: > "Alan Cameron" wrote in message > news:hrfml.50224$tb.4...@newsfe07.ams2... >>I am not sure of this is the right place to ask a question about the >>tutorial >> >> http://docs.python.org/3.0/tutorial/datastructures.html#sets >> >> why is the printed result of >> > basket

Re: Newcomer to Python tutorial question

2009-05-07 Thread Alan Cameron
"Chris Rebert" wrote in message news:mailman.5238.1241723354.11746.python-l...@python.org... > On Thu, May 7, 2009 at 11:58 AM, Alan Cameron > wrote: >> "Alan Cameron" wrote in message >> news:hrfml.50224$tb.4...@newsfe07.ams2... >>>I am not sure of this is the right place to ask a question ab

Re: Newcomer to Python tutorial question

2009-05-07 Thread Chris Rebert
On Thu, May 7, 2009 at 11:58 AM, Alan Cameron wrote: > "Alan Cameron" wrote in message > news:hrfml.50224$tb.4...@newsfe07.ams2... >>I am not sure of this is the right place to ask a question about the >>tutorial >> >> http://docs.python.org/3.0/tutorial/datastructures.html#sets >> >> why is the

Re: Newcomer to Python tutorial question

2009-05-07 Thread Peter Otten
Alan Cameron wrote: > I am not sure of this is the right place to ask a question about the > tutorial > > http://docs.python.org/3.0/tutorial/datastructures.html#sets > > why is the printed result of > basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} print(basket) > {

Re: Newcomer to Python tutorial question

2009-05-07 Thread Alan Cameron
"Alan Cameron" wrote in message news:hrfml.50224$tb.4...@newsfe07.ams2... >I am not sure of this is the right place to ask a question about the >tutorial > > http://docs.python.org/3.0/tutorial/datastructures.html#sets > > why is the printed result of > basket = {'apple', 'orange', 'apple',

Re: Newcomer to Python tutorial question

2009-05-07 Thread Florian Wollenschein
Alan Cameron wrote: I am not sure of this is the right place to ask a question about the tutorial http://docs.python.org/3.0/tutorial/datastructures.html#sets why is the printed result of basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} print(basket) {'orange', 'banana', 'p

Re: Newcomer to Python tutorial question

2009-05-07 Thread Arnaud Delobelle
"Alan Cameron" writes: > I am not sure of this is the right place to ask a question about the > tutorial > > http://docs.python.org/3.0/tutorial/datastructures.html#sets > > why is the printed result of > basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} print(basket) >

Re: Newcomer to Python tutorial question

2009-05-07 Thread Chris Rebert
On Thu, May 7, 2009 at 11:35 AM, Alan Cameron wrote> I am not sure of this is the right place to ask a question about the > tutorial > > http://docs.python.org/3.0/tutorial/datastructures.html#sets > > why is the printed result of > basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'ban

Newcomer to Python tutorial question

2009-05-07 Thread Alan Cameron
I am not sure of this is the right place to ask a question about the tutorial http://docs.python.org/3.0/tutorial/datastructures.html#sets why is the printed result of >>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} >>> print(basket) {'orange', 'banana', 'pear', 'apple'}