<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_table_results(output=None, without_header=None):
 """Convert returned data from non-list actions into a nice table for command line usage"""

    array = []
    str_output = str(output)

    if not without_header:
        array.append('RESULT')
        array.append('-' * max(6, len(str_output)))

    array.append(str_output)
    return os.linesep.join(array)