So i assume your code looks something like this:
def func(str):
print("\n".join(str))
A = [' _ ', '|_|', '| |']
B = [' _ ', '|_\'', '|_/']
C = [' _ ', '| ', '|_ ']
D = [' _ ', '| \'', '|_/']
E = [' _ ', '|_ ', '|_ ']
F = [' _ ', '|_ ', '| ']
func(A)
func(B)
func(C)
func(D)
func(E)
func(F)
This gives us this output:
_
|_'
|_/
I assume the output you are looking for is more like this:
_
|_\
|_/
You want that ' to be gone and replaced with , this doesnt mean the string is not terminated, it means that you escaped a quote. Lets take a look at the string that has this error, its the second string in the B array:
'|_''
first it prints a |
then it prints a _
and then it prints a ' (a quote which is escaped using a backslash)
We do not want to do this because we dont want to print a quote, but want to print a backslash character. this is done by escaping a backslash using a backslash (so you end up with a double backslash) \
So the correct B array should be:
B = [' _ ', '|_\\', '|_/']
You also appear to have made a similair mistake in D which should be D = [' _ ', '| \'', '|_/']
>>> B = [' _ ', '|_\'', '|_/']. Might there be any hidden characters or "smart" quotes that you didn't show here?A = [' _ ', '|_|', '| |'] B = [' _ ', '|_\'', '|_/'] C = [' _ ', '| ', '|_ '] D = [' _ ', '| \'', '|_/'] E = [' _ ', '|_ ', '|_ '] F = [' _ ', '|_ ', '| ']and I just call print(B)