I have looked for a solution to this problem for some time, and I do not think it is possible to do what I want.
I have a file containing large ascii art (100+ lines long each picture), and I was wondering if I could print each pic. to the console in only a couple lines (for an arbitrary number, let's say 5). I am using python3.
Edit: Here is an example of what I want to print to the console (color doesn't matter): Reese's Example v2
Is there a way I can print the above image to the console and have it remain that size in the console? It has about 100 lines of ascii text.
Thanks!
art = '''
*** ***
***....** **...***
**........** **.......**
*** **..........*.........** ***
**.....** **..................** **.....**
**.........** **..............** **.........**
*..............* *..........* *..............*
**..............* *......* *..............**
**..............** *....* **..............**
*......................................*
**..............**........**..............**
**..............* *....* *..............**
*..............* *....* *..............*
**.........** *....* **.........**
**.....** *....* **.....**
*** **....* ***
** * * *
'''.splitlines()
for line in art[::len(art)//5]:
print(line[::len(art)//5])
The results:
...**..*
...* .....**...*
*..... .**....*
..... .* .....*
*.. *. *.*
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.