我怎么能这个:
students = [("Abe", 200), ("Lindsay", 180), ("Rachel" , 215)]
进入这个:
Abe 200
Lindsay 180
Rachel 215
编辑:这应该适用于任何大小的列表.
解决方法:
>>> students = [("Abe", 200), ("Lindsay", 180), ("Rachel" , 215)]
>>> for a, b in students:
... print '{:<7s} {}'.format(a, b)
...
Abe 200
Lindsay 180
Rachel 215