你可以使用:
with open('data.txt', 'r') as file: data = file.read().replace('n', '')
上一篇 Python-如何扩展输出显示以查看pandas DataFrame的更多列?
下一篇 Python-return, return None, and no return at all?
版权所有 (c)2021-2022 MSHXW.COM
ICP备案号:晋ICP备2021003244-6号