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