import ast


def convert(val):
    """Convert input to interpreted data type.

    :param val: value to be interpreted
    :returns: interpreted value
    """
    try:
        return ast.literal_eval(val)
    except BaseException:
        pass
    return val