2018-09-27

[('foo', 1, 2), ('bar', 'hello'), ('foo', 3, 3)]

>>> def dofoo(x,y):

print('foo',x,y)

>>> def dobar(s):

print('bar',s)

>>> for tag,*args in records:

print(tag,args)

foo [1, 2]

bar ['hello']

foo [3, 3]

>>> for tag,*args in records:

print(args)

[1, 2]

['hello']

[3, 3]

>>>

你可能感兴趣的:(2018-09-27)