Using pprint.saferepr() for string comparisons in Python

Python's pprint.saferepr() can be a useful way of comparing string representations of dictionaries and other data types.