How to save a string in a text file and use it in my code later [Python]? : <p>The user is supposed to enter a string and I will save it in an text document. So far all is working, but the next step would be to read the string out and use it later on in my code. Can someone explain me how to do this? I am kinda new to python.</p>

<p>Here is what I got so far:</p>

<pre><code>import datetime

now = datetime.datetime.now()

_prename_human = ""

_prename_human = input("test")


text_file = open("save.txt", "w")
text_file.write("prenameHuman: %s" % _prename_human)

text_file.close()

text_file = open("save.txt", "r")

readFile = text_file.read()

text_file.close()
</code></pre>
