<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_list(data):
 """ Remove useless characters to output a clean list."""

    if isinstance(data, (list, tuple)):
        to_clean = ['[', ']', '(', ')', "'"]
        for item in to_clean:
            data = str(data).replace("u\"", "\"").replace("u\'", "\'")
            data = str(data).replace(item, '')
    return data