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? :-)
>
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%*.
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
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 []?