sunny123456

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2024年4月22日

摘要: 在Python中的for循环 for循环:用于遍历序列(如列表、元组、字典、集合或字符串)或其他可迭代对象。 pythonfor i in range(10): # 这将循环10次,i的值从0到9 print(i) while循环:当给定条件为真时,重复执行代码块。 pythoni = 0while 阅读全文
posted @ 2024-04-22 16:55 sunny123456 阅读(74) 评论(0) 推荐(0)