[Tutor] Spongebob Pythonpants

Timo timomlists at gmail.com
Fri Apr 24 12:21:32 CEST 2015


Op 24-04-15 om 04:37 schreef Jim Mooney:
> I was depressed at the thought of learning unicode, then discovered Python
> was fun again since I can easily print any ascii art from
> http://www.chris.com/ascii/  with a multiline print, so long as I replace
> any backslash with two of them.
You can save yourself some time and use a raw string:
print(r"""   <the original SpongeBob here>   """)

Timo


> Spongebob Squarepants was, of course, the
> obvious first choice. The heck with Tkinter. (Bob is coming out a bit thin
> in my gmail but looks fine in the REPL.)
>
> print('''
>        .--..--..--..--..--..--.
>      .' \\  (`._   (_)     _   \\
>    .'    |  '._)         (_)  |
>    \\ _.')\\      .----..---.   /
>    |(_.'  |    /    .-\\-.  \\  |
>    \\     0|    |   ( O| O) | o|
>     |  _  |  .--.____.'._.-.  |
>     \\ (_) | o         -` .-`  |
>      |    \\   |`-._ _ _ _ _\\ /
>      \\    |   |  `. |_||_|   |
>      | o  |    \\_      \\     |     -.   .-.
>      |.-.  \\     `--..-'   O |     `.`-' .'
>    _.'  .' |     `-.-'      /-.__   ' .-'
> .' `-.` '.|='=.='=.='=.='=|._/_ `-'.'
> `-._  `.  |________/\\_____|    `-.'
>     .'   ).| '=' '='\\/ '=' |
>     `._.`  '---------------'
>             //___\\   //___\\
>               ||       ||
>      LGB      ||_.-.   ||_.-.
>              (_.--__) (_.--__)''')
>
>
> *** Remote Interpreter Reinitialized  ***
>        .--..--..--..--..--..--.
>      .' \  (`._   (_)     _   \
>    .'    |  '._)         (_)  |
>    \ _.')\      .----..---.   /
>    |(_.'  |    /    .-\-.  \  |
>    \     0|    |   ( O| O) | o|
>     |  _  |  .--.____.'._.-.  |
>     \ (_) | o         -` .-`  |
>      |    \   |`-._ _ _ _ _\ /
>      \    |   |  `. |_||_|   |
>      | o  |    \_      \     |     -.   .-.
>      |.-.  \     `--..-'   O |     `.`-' .'
>    _.'  .' |     `-.-'      /-.__   ' .-'
> .' `-.` '.|='=.='=.='=.='=|._/_ `-'.'
> `-._  `.  |________/\_____|    `-.'
>     .'   ).| '=' '='\/ '=' |
>     `._.`  '---------------'
>             //___\   //___\
>               ||       ||
>      LGB      ||_.-.   ||_.-.
>              (_.--__) (_.--__)
>



More information about the Tutor mailing list