title: Python - empty argument in function
body: <p>I have a function in my script that takes two arguments and save result to file:</p>
  
  <pre><code>def listing(val, ftype):
  
      with open(sys.argv[3], "a+") as myfile:
          myfile.write(val + ftype + '\n')
      return
  </code></pre>
  
  <p>but I want to use it when only one argument is provided. I can define argument as empty string <code>''</code> like that: </p>
  
  <pre><code>listing('', '\n[*]Document files found:\n')
  </code></pre>
  
  <p>Is it the only way to deal with empty arguments?</p>