import itertools


def all_combinations(worlds):
    """ For a list of worlds (worlds = a possible situation), calculate the combinations
    of them (each element from one world with the elements of the other worlds).
    Additionally, statements are converted to sets of tuples.

    Parameters
    ----------
    worlds : list(list(list(str)))
        list of worlds

    Returns
    -------
    list(set(tuple(str)))
        List containing all combinations of the initial world list.

    """
    tupled_worlds = []
    for world in worlds:
        tupled_worlds.append([tuple(x) for x in world])

    combinations = [set(c) for c in itertools.product(*tupled_worlds)]
    return combinations