方法一:while循环 s = "懵逼树上懵逼果" index = 0 while index < len(s): #索引长度 print(s[index]) #用索引取元素 index += 1 #自增 方法二:for循环 s = "懵逼树上懵逼果" for i in s: print(i) Categories: python Tags: python-variable 0 Comments 发表评论 取消回复邮箱地址不会被公开。 必填项已用*标注 Name * Email * Website What's on your mind? 在此浏览器中保存我的姓名、电子邮件和站点地址。
0 Comments