一、循环语句两个类型
1. for x in ...
答案L = ['Bart', 'Lisa', 'Adam']
for L in L:
print("hello,",L,"!")
2. While语句
L = ['Bart', 'Lisa', 'Adam']
n = 0
while n <3:
print("hello,",L[n],"!")
n = n + 1
一、循环语句两个类型
1. for x in ...
答案L = ['Bart', 'Lisa', 'Adam']
for L in L:
print("hello,",L,"!")
2. While语句
L = ['Bart', 'Lisa', 'Adam']
n = 0
while n <3:
print("hello,",L[n],"!")
n = n + 1