for i in range(0,10):
if i <3:
print("loop ",i)
else :
continue
print("hehe...")
range(10)循环10次

while循环优化版本-for循环

优化之前的脚本

while循环优化版本-for循环

只打印偶数,从0打印到10,但是步长为2

while循环优化版本-for循环

while循环优化版本-for循环

相关文章:

  • 2022-02-02
  • 2022-12-23
  • 2021-12-29
  • 2021-09-09
  • 2021-08-24
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-27
  • 2022-12-23
  • 2021-04-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案