title: How to create a list of names, excluding missing values?
body: <p>I have been the getting results:</p>
  <p>Name: Hemingway, Ernest</p>
  <p>Name: Madonna,</p>
  <p>Name: , Voltaire</p>
  <p>Name: ,</p>
  <p>It seems as though the code is skipping all of my if and elif statements, I'm new to this so any help would be appreciated. Any explanation to my mistakes would be really beneficial.</p>
  <pre><code>def format_name(first_name, last_name):
          # code goes here
          string = (&quot;Name: &quot; + last_name + &quot;, &quot; + first_name)
          if first_name==0 and last_name==1:
              print (&quot;Name: &quot; + last_name)
          elif first_name==1 and last_name==0:
                  print (&quot;Name: &quot; + first_name)
          elif first_name==0 and last_name==0:
              print (&quot;&quot;)
          else:
              return string  
      ''''
      print(format_name(&quot;Ernest&quot;, &quot;Hemingway&quot;))
      # Should return the string &quot;Name: Hemingway, Ernest&quot;
      
      print(format_name(&quot;&quot;, &quot;Madonna&quot;))
      # Should return the string &quot;Name: Madonna&quot;
      
      print(format_name(&quot;Voltaire&quot;, &quot;&quot;))
      # Should return the string &quot;Name: Voltaire&quot;
      
      print(format_name(&quot;&quot;, &quot;&quot;))
      # Should return an empty string
  ''''
  </code></pre>