如何在我的python程序中显示以下文本?

San*_*ada 1 python text python-2.7

我想在我的程序中显示以下文本.当我在python中粘贴以下文本时,它会将反斜杠解释为转义序列并弄乱我的ascii art ..任何想法让这个解决了geeks.Here是我想要出现的文本在我的程序中

  _  __     _ _           _         ____            _               _                 
 | |/ /__ _| | | __ _  __| | __ _  |  _ \ __ _  ___| | ____ _  __ _(_)_ __   __ _ ___ 
 | ' // _` | | |/ _` |/ _` |/ _` | | |_) / _` |/ __| |/ / _` |/ _` | | '_ \ / _` / __|
 | . \ (_| | | | (_| | (_| | (_| | |  __/ (_| | (__|   < (_| | (_| | | | | | (_| \__ \
 |_|\_\__,_|_|_|\__,_|\__,_|\__,_| |_|   \__,_|\___|_|\_\__,_|\__, |_|_| |_|\__, |___/
                                                              |___/         |___/     
Run Code Online (Sandbox Code Playgroud)

Dan*_*elB 8

您可以使用原始字符串:

myString = r'''_  __     _ _           _         ____            _               _                 
 | |/ /__ _| | | __ _  __| | __ _  |  _ \ __ _  ___| | ____ _  __ _(_)_ __   __ _ ___ 
 | ' // _` | | |/ _` |/ _` |/ _` | | |_) / _` |/ __| |/ / _` |/ _` | | '_ \ / _` / __|
 | . \ (_| | | | (_| | (_| | (_| | |  __/ (_| | (__|   < (_| | (_| | | | | | (_| \__ \
 |_|\_\__,_|_|_|\__,_|\__,_|\__,_| |_|   \__,_|\___|_|\_\__,_|\__, |_|_| |_|\__, |___/
                                                          |___/         |___/'''
# note the r before the string starts
Run Code Online (Sandbox Code Playgroud)

更多信息

尝试测试之间的区别print '\tHello, world!'print r'\tHello, World!'