【问题标题】:How to continue the string when hitting enter in vs code输入vs代码时如何继续字符串
【发布时间】:2022-01-12 20:30:52
【问题描述】:

我目前正在使用 PyCharm,当我在其中按 Enter 键时,我的字符串一直是字符串。它看起来像这样:

string = "Hello"
         "keeps being here"

在 VS Code 中看起来像这样:

string = "Hello
its not here"

不幸的是,我不知道这叫什么,所以如果有人可以分享他们的知识,那就太好了。

【问题讨论】:

    标签: visual-studio-code pycharm


    【解决方案1】:

    我认为你可以使用 '\' 来实现这一点:

    string = "Hello\
    its not here"
    

    这应该对你有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-31
      • 2020-05-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-11
      • 2020-11-05
      相关资源
      最近更新 更多