def trimmed_input(prompt):
    """
    Prompt for and return input, stripping leading and trailing whitespace

    :param prompt: Prompt string presented to the user
    :return: Trimmed input
    """
    return input(prompt).strip()