def get_string(prompt):
    """Get and return a non-empty string"""
    if prompt[-1] != " ":
        prompt = prompt + " "
    string = input(prompt)
    while not string:
        if prompt[-31:] != " (you have to enter something) ":
            prompt = prompt + "(you have to enter something) "
        string = input(prompt)
    return string