python how to pass array value into file open request
<p>Hi guys I want to be able to pass a list of words into a for loop, how can I make the code below work</p>

<pre><code>list = ['word1','word2','word3']
for x in list
      with open('folder/{x}.txt') as fin:
      do something()
</code></pre>