<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def flatten(*sequence):
 """Flatten nested sequences into one."""

        result = []
        for entry in sequence:
            if isinstance(entry, list):
                result += Select.flatten(*entry)
            elif isinstance(entry, tuple):
                result += Select.flatten(*entry)
            else:
                result.append(entry)
        return result