[core] Remove import *
[lib] More pythonesc RemoveListBlanks.

Is this function even useful? I don't clearly see why this has been exported to
a specific function since it takes one line to achieve the same thing.