def format_table(table, key_space=5):
    """
    Accepts a dict of {string: string} and returns a string of the dict
    formatted into a table
    """
    longest = 0
    for k in table:
        if len(k) > longest:
            longest = len(k)
    result = '' 
    for k, v in table.iteritems():
        k += (longest - len(k)) * ' '
        result += k + (' '*key_space) + v + '\n'
    return result[:-1]