# -*- encoding: utf-8 -*-
#For循环
L = ['Bart', 'Lisa', 'Adam']
for name in L:
print('Hello, %s!'% name)
#While循环
maxNum = len(L)
i = 0
while i < maxNum:
print('Hello, %s!' % L[i])
i = i + 1
Sign in to make a reply
與生懼來
# -*- encoding: utf-8 -*-
#For循环
L = ['Bart', 'Lisa', 'Adam']
for name in L:
print('Hello, %s!'% name)
#While循环
maxNum = len(L)
i = 0
while i < maxNum:
print('Hello, %s!' % L[i])
i = i + 1