Storing a random byte string in Python
<p>For my project, I need to be able to store random byte strings in a file and read the byte string again later. For example, I want to store randomByteString from the following code:</p>

<pre><code>&gt;&gt;&gt; from os import urandom 
&gt;&gt;&gt; randomByteString=urandom(8)
&gt;&gt;&gt; randomByteString
b'zOZ\x84\xfb\xceM~'
</code></pre>

<p>What would be the proper way to do this?</p>

<p>Edit: Forgot to mention that I also want to store 'normal' string alongside the byte strings.</p>
