import random


def dice(n=2, sides=6):
    """
    >>> random.seed("test")
    >>> dice()
    [6, 6]
    >>> dice(6)
    [3, 6, 2, 2, 1, 5]
    >>> dice(4, sides=8)
    [7, 3, 4, 6]
    >>> dice(4, sides=4)
    [3, 3, 4, 3]
    """
    return [random.randint(1,sides) for i in range(n)]