update compare_collections.py for backward compatibility

list compreshension for dictionaries works with dict() only in python 2.6