title: Create/call file with a variable name
body: <p>I'm actually trying to program a sort of "rolegame", and actually I'm stuck in the process of creating the new Character files. I'm actually trying to make it so, if I call a character file, the system checks if it exists and, if not, it will create it. This is the code, just trying if it will create an empty file called <code>(charactername).char</code>:</p>
  
  <pre><code>import os
  def call_char(name):
  file = "%s.char" %name
  if os.path.exists(file):
      print ("file loaded")
      open_char(file)
  else:
      print ("creating new character")
      new_char(file)
  
  """creates a new character file"""
  def new_char(file):
      print ("Character %s."%file)
      file(file, "w")
  
  call_char("Volgrand")
  </code></pre>
  
  <p>However, I get this error while executing <code>call_char("Volgrand")</code></p>
  
  <pre><code>  File "E:\python\Juego foral\test.py", line 51, in new_char
      file(file, "w")
  TypeError: 'str' object is not callable"
  </code></pre>
  
  <p>I though that calling the variable <code>file</code> (a string) should work to create the new file. </p>