Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print full ascii art

I am trying to print ascii art like this:

print(("""\

                                       ._ o o
                                       \_`-)|_
                                    ,""       \ 
                                  ,"  ## |   ಠ ಠ. 
                                ," ##   ,-\__    `.
                              ,"       /     `--._;)
                            ,"     ## /
                          ,"   ##    /


                    """).encode('utf-8'))

And the output does not look right at all.

What is the proper method of printing ascii art?

like image 370
user3476998 Avatar asked May 13 '14 05:05

user3476998


3 Answers

print(r"""\

                                   ._ o o
                                   \_`-)|_
                                ,""       \ 
                              ,"  ## |   ಠ ಠ. 
                            ," ##   ,-\__    `.
                          ,"       /     `--._;)
                        ,"     ## /
                      ,"   ##    /


                """)

The r allows you to print raw text better especially when there is a lot of inverted commas in the picture that you are trying to print.

like image 188
Samantha Penningtoon Avatar answered Oct 19 '22 04:10

Samantha Penningtoon


print(r"""\

                               ._ o o
                               \_`-)|_
                            ,""       \ 
                          ,"  ## |   ಠ ಠ. 
                        ," ##   ,-\__    `.
                      ,"       /     `--._;)
                    ,"     ## /
                  ,"   ##    /


            """)
print(r"""\

                               ._ o o
                               \_`-)|_
                            ,""       \ 
                          ,"  ## |   ಠ ಠ. 
                        ," ##   ,-\__    `.
                      ,"       /     `--._;)
                    ,"     ## /
                  ,"   ##    /


            """)
like image 29
Yash Shukla Avatar answered Oct 19 '22 02:10

Yash Shukla


print(r"""\

                               ._ o o
                               \_`-)|_
                            ,""       \ 
                          ,"  ## |   ಠ ಠ. 
                        ," ##   ,-\__    `.
                      ,"       /     `--._;)
                    ,"     ## /
                  ,"   ##    /


            """)

this will type or print this in raw text

like image 29
jacob Avatar answered Oct 19 '22 02:10

jacob