from typing import List
import random


def delete_token(seq: List, p: float):
    """
    Randomly drop tokens

    Args:
        seq: original sequence
        p: drop rate

    Returns:
        - sequence with randomly deleted tokens
    """
    seq = [s for s in seq if random.random() > p]
    return seq