Python2 练习实例77

Python 100例Python 100例

题目:循环输出列表

程序分析:无。

程序源代码:

实例


#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
if __name__ == '__main__':
    s = ["man","woman","girl","boy","sister"]
    for i in range(len(s)):
        print s[i]

以上实例输出结果为:

man
woman
girl
boy
sister

Python 100例Python 100例