使用PyCharm编写Python代码, 有时候过长的代码, 会超过边界, 导致阅读或者修改起来很麻烦.
网上搜索了下解决方案.
以下两个步骤.
(1)首先打开以下路径,
File --> Settings... --> Editor --> General, 勾上右边的Soft-wrap files, 并在后面的text中, 输入";.py"
(2)再打开以下路径,
File --> Settings... --> Editor --> General --> Console, 勾上右边的Use soft wraps in console
以上两步骤后, 即可实现换行.
引用:
https://blog.csdn.net/chichu261/article/details/82784904