3.8.1 for语法

更新于 2026年10月13日 版权声明
3.8.1 for语法

for语法如下:

for 临时变量 in 序列:
    重复执行的代码1
    重复执行的代码2

快速体验(https://www.daowen.com)

str1 = 'welcome to ENSHI'
for i in str1:
    print(i)

✍AI写作