The repr module provides a means for producing object representations with limits on the size of the resulting strings. This is used in the Python debugger and may be useful in other contexts as well.
This module provides a class, an instance, and a function:
aRepr. It returns a
string similar to that returned by the built-in function of the same
name, but with limits on most sizes.