title: Python: pop from empty list
body: <p>I am using below line in a loop in my code</p>
  <pre><code>importer = exporterslist.pop(0)
  </code></pre>
  <p>If <code>exporterslist</code> has no entries it returns <code>error: IndexError: pop from empty list</code>. How can I bypass exporterslist with no entries in it?</p>
  <p>One idea I can think of is if exporterslist is not None then <code>importer = exporterslist.pop(0)</code>
  else get the next entry in the loop.
  If the idea is correct, how to code it in python?</p>