First post and newbie to coding. Apologies if this is redundant. I've searched high and low and have yet to come across something specific to this particular issue.
I'm designing a choose your own adventure game using Python3. It's a bit heavy on text, so I wanted to keep the dialogue and other story aspects in a separate text file so that I can keep my code as lean and clean as possible. I've tried a few different tactics unsuccessfully, including an attempt at implementing a dictionary in the text file to use in the script like indices. I'm not discounting that tactic, but have moved on and here is where I'm currently at:
def intro():
intro = open("try.txt", "r")
print(intro.readlines(0))
intro()
Where 0 is the first line of text in the text file. I'm hoping that I can select individual lines to grab and display when navigating through the script through prompts, but the output includes square brackets around the bulk of the text, and backslashes before apostrophes. As an example: ['Tensions are rising on the high seas. There\'s trouble about.']
Is there any way to preclude the addition of escape characters and/or the square brackets in the printed output using this method?
Thanks in advance!