Python 运行 shell 获取输出结果的实例 首先使用内置模块os.>>>importos>>>code=os.system("pwd&&sleep2")#/User/zhipeng>>>printc 输出结果