使用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