title: Python idiom to return first item or None
body: <p>I'm calling a bunch of methods that return a list.  The list may be empty.  If the list is non-empty, I want to return the first item; otherwise, I want to return <code>None</code>.  This code works:</p>
  <pre class="lang-py prettyprint-override"><code>def main():
      my_list = get_list()
      if len(my_list) &gt; 0:
          return my_list[0]
      return None
  </code></pre>
  <p>but it seems to me that there should be a simple one-line idiom for doing this. Is there?</p>