Learn to Code via Tutorials on Repl.it!

← Back to all posts
ASCII_Art
Jakman (450)

If you want an easy way of putting ASCII art in your programs without going through the stress of putting this art in a string and escaping all the back slashes you can just read them from a text file like i do. It takes much less time.

This post has been locked
Commentshotnewtop
xolyon (336)

there is one issue with this and that is that it leaves a line each time , stretching the art and giving it much less appeal , this is because you are printing each line but the way lines are encoded is with an invisible "\n" which means extra line(if you print all the lines you will see)

so when the code iterates the next line is \n and so leaving another line making it stretched to fix this just print the whole thing and forget the loop

ascii = open("art.txt", "r")
asciiRead = ascii.read()
print(asciiRead)

Bam and it's much better

Jakman (450)

@xolyon hey boss. I was wondering if you would like to make another project with me. I have grown alot since we met months ago and i think that we can make some amazing thing now (I also think that hot needs some new things to enjoy)

[deleted]

Cool ascii!

[deleted]

Cool @Jakman !
I used the ascii in my post!

Jakman (450)

@Zuhdi28 yeah i never thought of using comments and printing them!
Very innovative.

[deleted]
King597 (2)

Thanks! Works perfectly.

xolyon (336)

@CodingCactus @epicman702 you guys online? I wanna work on game a bit

xolyon (336)

@CodingCactus ok imma do something real quick read my comments on instructions.md end.py and ur devlog!

CodingCactus (3013)

@xolyon ye, but can't do anymore game tonight

xolyon (336)

@CodingCactus kk you can do recruitment on discord if u want

xolyon (336)

@Jakman wanna work on the project?

xolyon (336)

@Jakman wait do u know what it is?

Jakman (450)

@xolyon lol no but ill still do it

xolyon (336)

@Jakman ok go to devolopment folder and read instructions and lore and basically everything in the folder

Jakman (450)

@xolyon ey boss wanna do somethin trashy again?