语法
for 临时变量 in 序列:
重复执行的代码1
重复执行的代码2
..........
快速体验
str1 = 'helloworld'
for i in str1:
print(i, end=" ")
h e l l o w o r l d
————————————————
摘自:www.weidianyuedu.com/content/0214567378956.html
语法
for 临时变量 in 序列:
重复执行的代码1
重复执行的代码2
..........
快速体验
str1 = 'helloworld'
for i in str1:
print(i, end=" ")
h e l l o w o r l d
————————————————
摘自:www.weidianyuedu.com/content/0214567378956.html