2. 上一题打印的样式不是很好,能不能修改一下代码打印成下图的样式呢?【请至少使用两种方法实现】
member = ['小甲鱼', 88, '黑夜', 90, '迷途', 85, '怡静', 90, '秋舞斜阳', 88]
方法一:
count = 0
length = len(member)
while count < length:
print(member[count], member[count+1])
count += 2
方法二:
for each in range(len(member)):
if each%2 == 0:
print(member[each], member[each+1])
这关较难,建议再看。