Python - Remove extra empty strings : Let's say I have a Python list of strings like so:

    x = ["", "", "test", "", "", "not empty", "", "yes", ""]

> ['', '', 'test', '', '', 'not empty', '', 'yes', '']

How can I remove excess (but not all) empty strings as well as trailing, and leading empty strings, like so:

> ['test', '', 'not empty', '', 'yes']