For loop to open files in Python
<p>I am relatively new to Python and need to run a python macro through Abaqus. I am opening files e.g "nonsym1, nonsym2, nonsym3". I'm trying to do this with a loop. The code opens nonsym1 (in abaqus) and performs some operations on it, then is supposed loop back and do the same to the other files. Here is the code I'm trying...</p>

<pre><code>for i in range (1,10):
    filename = 'nonsym(i)'
    step = mdb.openStep(
        'C:/Users/12345678/Documents/Inventor/Aortic Dissection/%s.stp' %filename, 
        scaleFromFile=OFF) 
</code></pre>

<p>My main issue is coming from the fact that the %s in the directory I think?... 
<a href="http://i.stack.imgur.com/K7yzX.png" rel="nofollow">error message when trying to run this macro</a> Don't know how to best approach this, so any help would be great thanks! Still learning!</p>