title: Write text to file in columns
body: <p>As an attorney I am a total newbie in programimg. As an enthusiastic newbie, I learn a lot. (what are variables, ect.) ).</p>
  
  <p>So I'm working a lot with <code>dir()</code> and I'm looking into results. It would by nicer if I could see the output in one or more columns. So I want to write my first program which write for example <code>dir(sys)</code> in a output file in columns.</p>
  
  <p>So far I've got this:</p>
  
  <pre><code>textfile = open('output.txt','w')
  syslist = dir(sys)
  
  for x in syslist:
      print(x)
  </code></pre>
  
  <p>The output on display is exactly what I want, but when I use the <code>.write</code> like:</p>
  
  <pre><code>textfile = open('output.txt','w')
  syslist = dir(sys)
  
  for x in syslist:
      textfile.write(x)
  
  textfile.close()
  </code></pre>
  
  <p>The text is in lines.</p>
  
  <p>Can anyone pleaase help me, how to write the output of <code>dir(sys)</code> to a file in columns?</p>
  
  <p>If I can ask you, please write the easysiet way, because I really have to look almost after for every word you write in documentation. Thanks in advance.</p>