def left_pad(string, length, character=" "):
    """Left pad a `string` to `length` characters with `character`."""
    if not isinstance(string, str):
        string = str(string)
    if not isinstance(character, str):
        character = str(character)
    return string.rjust(length, character)