from typing import List


def group(x: str, patterns: str) -> List[int]:
    """Find patterns that are present in string x.

    Parameters
    ----------
    x : str
        A document string
    patterns : str
        Patterns to search for

    Returns
    -------
    List[int]
        List of indices of which patterns are present in string x
    """
    result = []
    for idx, pattern in enumerate(patterns):
        if pattern in x:
            result.append(idx)
    return result