On 26/07/13 22:55, Jim Mooney wrote:
bigBox = [ {1:2,3:4}, ['a',2,;freddy',True], (1,2,3) ]
That is totally cool. I see something here every day that I know will
be useful. Although Python choked on the semicolon in front of freddy.
Oops, my bad. It should, of course be a quote sign.
And using True in place of 1 is sneakily pedagogical ;')
It's not 'in place of' 1, it is a totally different value and type.
It's only a happy coincidence that bool(1) returns True. So does
bool(-9) after all...
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor