
tjreedy at udel
Jun 24, 2008, 11:40 AM
Post #13 of 13
(311 views)
Permalink
|
cokofreedom[at]gmail.com wrote: > On Jun 24, 5:38 am, "Mark Tolonen" <M8R-yft...@mailinator.com> wrote: > In Python 3k I believe you can put a * next to one of the variables to > hold multiple arguments. That'll be aidful! IDLE 3.0b1 >>> a,b,*c=[1,2,3,4,5] >>> c [3, 4, 5] >>> a,*b,c = [1,2,3,4,5] >>> b [2, 3, 4] >>> a,b,*c=[1,2] >>> c [] Augmented assignment is quite similar to argument passing: at most one starred target; at least as many items as un-starred targets (as now). tjr -- http://mail.python.org/mailman/listinfo/python-list
|