热门

最新

红包

立Flag

投票

同城

我的

发布
chenmoxuexi
w沉默味道w
3 年前
truechenmoxuexi

python基础

for....in....循环可以直接将字符串、列表等序列遍历
例如:
str = 'hello,Python'
for i in str:
print(i)
运行得到:
h
e
l
l
......
-----------------------------------------------------------
program_list = ['张三', '李四', '王五']
for i in program_list:
print(i)
运行得到:
张三
李四
王五

CSDN App 扫码分享
分享
评论
3
打赏
  • 复制链接
  • 举报
下一条:
是不是高温让它变成了紫色
立即登录