Re: [Tutor] Novice qustion

2009-09-24 Thread george fragos
2009/9/24 Oxymoron : >> print format % (item_width, 'Cantaloupes', price_width, 1.92) >> print format % (item_width, 'Dried Apricots (16 gr)' price_width, 8) > > > Notice the line before (works) and after (doesn't work - as the interpreter > pointed out), how do you separate items in a tuple? :-) >

[Tutor] Novice qustion

2009-09-24 Thread george fragos
 Hi all Pythons!  I'm new to Python and this List!  I'm reading Hetland's "Beginning Python" and I tried to test myself an example the book provides in 59:  width = input('Please enter width: ') price_width = 10 item_width = width - price_width header_format = '%-*s%*s' format        = '%-*s%*.

Re: [Tutor] On slicing

2009-09-17 Thread george fragos
2009/9/17 Rich Lovely : > 2009/9/17 george fragos : >>  If numbers=[1,2,3,4,5,6,7,8,9,10] and since "...any time the >> leftmost index in a slice comes later in the seqence than the second >> one... the result is always an empty sequence", why the slice >> n

[Tutor] On slicing

2009-09-17 Thread george fragos
If numbers=[1,2,3,4,5,6,7,8,9,10] and since "...any time the leftmost index in a slice comes later in the seqence than the second one... the result is always an empty sequence", why the slice numbers[10:0:-2] produces the sequence [10,8,6,4,2] but not the sequence []?