Opening files with the name of a variable : <p>I am using a Markov chain. When the chain arrives at a particular state, two files (a .png and an .mp3) need to open.</p>

<p><code>s</code> is the current state of the chain, an integer from 1-59. </p>

<p>I can't seem to find how to open the file with the same number as 's'.</p>

<p>I'm sure it has something to do with <code>%str</code> formatting, but I can't seem to implement it.</p>

<pre><code>img = Image.open('/.../.../s.png')
img.show()
</code></pre>
