Python label for _ 用法

Python label for _ 用法

>>> label_data = [iter([3,4]),iter([4,9]), iter([7,3]),iter([9,1])]
>>> label_data = [iter([3,4]),iter([4,9]), iter([7,3]),iter([9,1]),iter([8,5])]
>>> labels = [label for _, label in label_data]
>>> print labels
[4, 9, 3, 1, 5]
>>> label_data = [iter([12,4]),iter([4,9]), iter([7,3]),iter([9,1]),iter([8,5])]
>>> labels = [label for _, label in label_data]
>>> print labels
[4, 9, 3, 1, 5]
>>> label_data = [iter([12,4]),iter([31,9]), iter([7,3]),iter([9,1]),iter([8,5])]
>>> labels = [label for _, label in label_data]
>>> print labels
[4, 9, 3, 1, 5]

是取 iter 右值

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545}
span.s1 {font: 12.0px '.PingFang SC'}

05-11 21:54