title: How to ignore undefined variables passed to the print function?
body: <p>I have the following code:</p>
  
  <pre><code>help1 = 14
  help2 = "nice"
  help3 = "gate"
  
  try:
      print('''
      help1 %d
      help2 %s
      help3 %s
      help4 %s
      ''' % (help1, help2, help3, help4))
  except (NameError):
      print("")
  </code></pre>
  
  <p>I would like my <code>print</code> to reference multiple variables, some of which aren't defined (such as <code>help4</code>). How can I amend the print statement to skip any undefined variables? I tried with a <code>nameError</code> exception - but couldn't get it to work.</p>