def parse_variable_assignments(assignments):
    """
    Parses a list of key=value strings and returns a corresponding dictionary.
    Values are tried to be interpreted as float or int, otherwise left as str.
    """
    variables = {}
    for assignment in assignments or ():
        key, value = assignment.replace(' ', '').split('=', 1)
        for convert in (int, float, str):
            try:
                value = convert(value)
            except ValueError:
                continue
            else:
                break
        variables[key] = value
    return variables