Replace special character in string
<p>I'm having a issue with a problem where I want to replace a special character in a text-file that I have created with a string that I defined.</p>

<pre><code>"""
This is a guess the number game.
"""
import datetime, random
from random import randint

fileOpen = open('text.txt','r')
savedData = fileOpen.read()
fileOpen.close()
#print (savedData)

now = datetime.datetime.now()
date = now.strftime("%Y-%m-%d")
date = str(date)
#print(date)
time = now.strftime("%H:%M")
time = str(time)
#print(time)


savedData.replace(";", date)
print (savedData)
</code></pre>

<p>I have tried with something that looks like this. I thought I could just read from the file, save it's content in my own string and then use the <code>replace</code> function to alter the string.
But when I try to do the last print, noting has happened with the <code>saveData</code> string. What am I doing wrong?</p>

<p>The text-file just looks like this, all is on one line:</p>

<pre><code>Today it's the ; and the time is (. I'm feeling ) and : is todays lucky number. The unlucky number of today is #
</code></pre>