def expr2str(expr):
    """Convert a Python expression into a Python code."""
    if isinstance(expr, dict):
        return str(expr)
    if isinstance(expr, list):
        return '%s' % expr
    if isinstance(expr, str):
        return "'%s'" % expr
    return '%s' % str(expr)
