Modify Dict and List compare functions

Modify Dict and List compare functions
Modify testcase