<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(l, unique=True):
 """flatten a list of lists Parameters l : list of lists unique : boolean whether or not only unique items are wanted (default=True) Returns ------- list of single items Examples -------- Creating a sample list whose elements are lists of integers Applying flatten function [1, 2, 3, 4, 5, 6] """

    l = reduce(lambda x, y: x + y, l)
    if not unique:
        return list(l)
    return list(set(l))