首页 > 程序开发 > Web开发 > python教程 > Python 实例 >

Python 练习实例77

2016-01-12

题目:循环输出列表程序分析:无。程序源代码: ! usr bin python -*- coding: UTF-8 -*-if __name__ == & 39;__main__& 39;: s = ["man","woman","girl","boy","sister"] for i in

题目:循环输出列表

程序分析:无。

程序源代码:

#!/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
相关文章
最新文章
热点推荐