M
Message Drop Box
All,
How (and why) does zip(*someList) work?
I've never seen the star '*' outside of function/method definitions
and I've looked in the Python documentation without success. This
syntax is voodoo to me at the moment. I'm stumped.
Thanks,
Stuart
How (and why) does zip(*someList) work?
[(1, 'one', 'I'), (2, 'two', 'II'), (3, 'three', 'III')]s = [[1, 2, 3], ['one', 'two', 'three'], ['I', 'II', 'III']]
zip(*s)
I've never seen the star '*' outside of function/method definitions
and I've looked in the Python documentation without success. This
syntax is voodoo to me at the moment. I'm stumped.
Thanks,
Stuart