我想打印出从该行代码的输出换行符:如何设置格式 n在Python
subprocess.check_output('cmd.exe /K cmd',shell=False)
但输出是这样的
**Microsoft Windows [Version 6.3.9600]\r\n(c) 2013 Microsoft Corporation. All rights reserved.\r\n\r\nC:\\Users\\19leungc8\\Desktop>\r\nC:\\Users\\19leungc8\\Desktop>**
取而代之:
**Microsoft Windows [Version 6.3.9600]**
**(c) 2013 Microsoft Corporation. All rights reserved.**
如果需要,我会提供更多信息。
我已经得到我的代码工作。谢谢你的帮助 –