I am making a hangman program,
how can I include my art in the python
without typing print on every line
is there a multi-line print
like they have multi-line comments?
I don’t mind importing all of the pictures
from a text file, can’t figure this out from
the documentation, thanks for your help.
def visual():
if count = 1:
## shows the hanging ascii art
`
***************
* *
* *
* *
* *
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
***********************
one wrong
***************
* *
* *
* *
* ....
* . ..
* .. .
* .. .
* .....
*
*
*
*
*
*
*
*
*
*
*
*
*
two wrong
***************
* *
* *
* *
* ....
* . ..
* .. .
* .. .
* .....
* .
* .......
*
*
*
*
*
*
*
*
*
*
*
`
Use the
'''or"""triple-quoted string literal:I used a
\newline escape after the opening tripple-quote to avoid having to put the first line right after the opening quotes. The string thus starts atYou(no newline before it):