'''
Write a function called friends_teams that takes a list of friends, a team_size
(type int, default=2) and order_does_matter (type bool, default False).

Return all possible teams. Hint: if order matters (order_does_matter=True),
the number of teams would be greater.
'''

from itertools import combinations, permutations
friends = 'ben bob sue meredith allen'.split()


def friends_teams(friends, team_size=2, order_does_matter=False):
    if order_does_matter:
        return list(permutations(friends, team_size))
    else:
        return list(combinations(friends, team_size))

    pass


if __name__ == '__main__':
    print(friends_teams(friends))
    print()
    print(friends_teams(friends, order_does_matter=True))
