i = 0 while i < 3: print(i) i += 1
i = 1 while i < 10: j = 1 while j <= i: print(f'{j} * {i} = {i*j}', end=' ') j += 1 print() i += 1
运行结果:
list_val = [1, 33, 55, 10] for item in list_val: print(item)