Python: pop from empty list

You’re on the right track.

if exporterslist: #if empty_list will evaluate as false.
    importer = exporterslist.pop(0)
else:
    #Get next entry? Do something else?

Leave a Comment