#格式化字符
print "hello, %s" % ('mm')

#传递参数
 n="192.168.200.2"
os.popen('ping %s -c 2' % (n)).readlines()

 

相关文章: