Python Practice Example 77

Python 100例Python 100 Examples

Problem:Loop through and output the list

Program analysis:None.

Program source code:

Example

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

The output of the above example is:

man
woman
girl
boy
sister

Python 100例Python 100 Examples

Other extensions