第 010讲:一个打了激素的数组[01]
作业:
0. 整数, 浮点数,数组,对象
1. append, extend, insert
2. append()
只能加一个数;
extend()
可以加多个数
动动手:
小甲鱼
88
黑夜
90
迷途
85
怡静
90
秋舞斜阳
方法一:
member = ['幸福', '80', '黑夜', '90', '谜题', '100', '怡景', '110', '秋儿屋', 88]
count = 0
length = len(member)
while count < length:
print(member[count],member[count+1])
count +=2
方法二:
member = ['幸福', '80', '黑夜', '90', '谜题', '100', '怡景', '110', '秋儿屋', 88]
for each in range(len(member)):
if each%2 == 0:
print(member[each],member[each+1])