Given a list:
mylist = [\'dog\', \'cat\', \'mouse_bear\', \'lion_tiger_rabbit\', \'ant\']
I\'d like a one-liner to return a new list:
Split each item into sublists and flatten them:
[item for sublist in mylist for item in sublist.split("_")]