import random


def scramble(word) -> str:
    """Scrambles a word"""

    scrambled_word = ""
    word = list(word)

    while word:
        random_index = random.randint(0, len(word) - 1)
        scrambled_word += word[random_index]
        word.pop(random_index)

    return scrambled_word