\n是换行符:

  使用时需要放在字符串里面,成为字符串的一部分(不要嫌乱,这是我之前犯的错误)。

  示例:

    >>>print("I am Guido \n what's yonr name?")

    >>>I am Guido

    >>>what's your name?

 

\t是制表符:

  使用时效果如下。

  示例:

    >>>print("I am Guido \n \t what's your name?")

    >>>I am Guido

    >>>     what's your name?

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2021-11-14
  • 2021-06-02
  • 2022-12-23
相关资源
相似解决方案