def _fixed_length_strings(strings, length=0):
    """Return list of fixed length strings, left-justified and right-padded
    with spaces.

    :param strings: List of variable length strings
    :param length: Length of strings in returned list, defaults to the maximum
         length in the original list if set to 0.
    :type length: int or None
    """
    if length == 0 and strings:
        length = max(len(s) for s in strings)
    return [s.ljust(length) for s in strings]