How to append a string into a list without its new line "\n" in Python 3?
<p>I have a text file something like this (suppose A and B are persons and below text is a conversation between them):</p>

<pre><code>A: Hello
B: Hello
A: How are you?
B: I am good. Thanks and you?
</code></pre>

<p>I added this conversation into a list that returns below result:</p>

<pre><code>[['A', 'Hello\n'], ['A', 'How are you?\n'], ['B', 'Hello\n'], ['B', 'I am good. Thanks and you?\n']]
</code></pre>

<p>I use these commands in a loop:</p>

<pre><code>new_sentence = line.split(': ', 1)[1]
attendees_and_sentences[index].append(person)
attendees_and_sentences[index].append(new_sentence)

print(attendees_and_sentences) # with this command I get the above result
print(attendees_and_sentences[0][1]) # if I run this one, then I don't get "\n" in the sentence.
</code></pre>

<p>The problem is those "\n" characters on my result screen. How can I get rid of them?</p>

<p>Thank you.</p>