[root@bogon ~]# python a.py you he it [root@bogon ~]# cat a.py #!/usr/bin/python #encoding:utf-8 def sum(): arry = ['you','he','it'] for i in arry: print(i) if __name__ == "__main__": sum() [root@bogon ~]#