我想从中获取输出,os.system("nslookup google.com")但0在打印时我总是得到, 。这是为什么,我该如何解决?(Python 3,Mac)
os.system("nslookup google.com")
0
(我查看了如何存储它在 python 中打印到 stdout 的 os.system 的返回值? -但我不明白~我是 python 新手)
python subprocess os.system python-3.x
os.system ×1
python ×1
python-3.x ×1
subprocess ×1