如何转动students = [("Abe", 200), ("Lindsay", 180), ("Rachel" , 215)]
成:
Abe 200
Lindsay 180
Rachel 215
这应该可以适用于任何大小的列表。
答案 0 :(得分:2)
students = [("Abe", 200), ("Lindsay", 180), ("Rachel" , 215)]
for student in students:
print(*student, sep='\t') # python 3
for student in students:
print '\t'.join(str(i) for i in student) # python 2