title: python read txt files into single file
body: <p>Looking to read a directory of sql queries in separate files into a single file</p>
  
  <p>I'm a beginner in python but I figured this task would be an easy enough start.</p>
  
  <pre><code>EQ = open("EnmaxQueries.SQL","a+")
  &gt;&gt;&gt; for file in dir:
  ...     with open(file,"r") as reader:
  ...             EQ.write(reader.read())
  ...
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: 'builtin_function_or_method' object is not iterable
  </code></pre>
  
  <p>What does the error refer to? Usually it appear to referring to a function rather than its output but I thought my function calls all used (). </p>
  
  <p>Should I be approching this in another way? Have I made an error in scope of the loop or faile dto execute the multi line block properly or something?</p>
  
  <p>EDIT:dir was defined by os.listdir and this refers to the method listdir and not it's output as is typical for this error. </p>