用 codecs, 大概是這樣子:

# python3 code
import codecs

print(codecs.getdecoder("unicode_escape")('first line\nsecond line\n\"\"\"')[0])

  

結果:

first line
second line
"""

相关文章:

  • 2021-08-07
  • 2022-12-23
  • 2021-10-28
  • 2021-09-23
  • 2021-08-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案