import random


def shuffle(inp: str, seed=None) -> str:
    """Randomly shuffle a string.

    :param inp: String to shuffle
    :param seed: random seed passed to random
    :return: str, a new string consisting of inp randomly shuffled

    >>> shuffle('abcdefghij', seed=3.1415)
    'gdjhfcebia'
    """
    random.seed(seed)
    seq = list(inp)
    random.shuffle(seq)
    return ''.join(seq)