Delete empty values from dictionary in place

Now it should pass unit tests for both python2 and python3