Python Forum
Multi line strings and Ascii art
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi line strings and Ascii art
#1
Hi!
I am programing an RPG at the moment and at several points I use Ascii art.

There is a simple way to print several lines of Ascii art by using a multi line string

For example, In my RPG, I have an Ascii art drawing of my character Yeves Draco.

To get it to print several lines, you simply type

print (""" 


[your ascii art or multiple line string goes here]



""")
You use triple quotation/speech marksĀ  to get it to print several lines.


Hope I was of help to anyone who neded it!






Yeves Draco
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to add multi-line comment section? Winfried 1 193 Mar-24-2024, 04:34 PM
Last Post: deanhystad
  Trying to understand strings and lists of strings Konstantin23 2 757 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  regex multi-line kucingkembar 6 1,545 Aug-27-2022, 10:27 PM
Last Post: kucingkembar
  Splitting strings in list of strings jesse68 3 1,757 Mar-02-2022, 05:15 PM
Last Post: DeaD_EyE
  multi-line CMD in one-line python kucingkembar 5 3,956 Jan-01-2022, 12:45 PM
Last Post: kucingkembar
  Multi-line console input lizze 4 2,351 Dec-26-2020, 08:10 AM
Last Post: lizze
  How to Remove Non-ASCII Characters But Leave Line Breaks In Place? bmccollum 4 4,293 Apr-09-2020, 07:59 PM
Last Post: DeaD_EyE
  Python convert multi line into single line formatted string karthidec 2 9,411 Dec-23-2019, 12:46 PM
Last Post: karthidec
  multi-line messages in raised exceptions? Skaperen 3 7,315 Aug-01-2019, 02:17 AM
Last Post: Skaperen
  Finding multiple strings between the two same strings Slither 1 2,514 Jun-05-2019, 09:02 PM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020