# cat test.py 
#!/bin/env python
import os
def hell():
    os.system('ls')
print hell()

# python test.py 
1.py  1.py_01   test.py  test.sh
None

只要讲最后输入的print hell() 改为 hell(),去掉print 即可; 若其他的函数里面有 print (xx函数),返回 None,把print(xx函数) 改为 return xx函数即可; 是因为python函数使用return返回值,若不用return而使用print输出值,那么这函数默认还有一个返回值为None。