嘻皮客娱乐学习网
标题:
用Python写一个for循环的例子
[打印本页]
作者:
博翔影海
时间:
2014-11-30 16:55
标题:
用Python写一个for循环的例子
Python的for循环可以循环所有序列(一个list或者string), 如:
a = ['abc', 'bcde', 'efghi', 'hello word']
for i in a:
print (i)
print (len(i))
代码在Python3.0下调试通过
欢迎光临 嘻皮客娱乐学习网 (http://www.xipick.com/)
Powered by Discuz! X3.3