import os # rm /home/file commmand='rm /home/%s'%('file')os.popen(command) 转载于:https://www.cnblogs.com/shengxinjack/p/7346528.html