I am trying to replicate this string:
This is what my attempt looks like, as you can see the values are not aligned correctly. I know I need to use some type of padding but everything I've done has failed.
Here is my code:
individual_text = '''
Highest Individual Question Scores
• Leaders
• {}{:.2f}
• {}{:.2f}
• {}{:.2f}
• Colleagues
• {}{:.2f}
• {}{:.2f}
• {}{:.2f}
Lowest Individual Question Scores
• Leaders
• {}{:.2f}
• {}{:.2f}
• {}{:.2f}
• Colleagues
• {}{:.2f}
• {}{:.2f}
• {}{:.2f}
'''.format(top_3_leader.index[0], top_3_leader.values[0],
top_3_leader.index[1], top_3_leader.values[1],
top_3_leader.index[2], top_3_leader.values[2],
top_3_colleague.index[0], top_3_colleague.values[0],
top_3_colleague.index[1], top_3_colleague.values[1],
top_3_colleague.index[2], top_3_colleague.values[2],
bottom_3_leader.index[0], bottom_3_leader.values[0],
bottom_3_leader.index[1], bottom_3_leader.values[1],
bottom_3_leader.index[2], bottom_3_leader.values[2],
bottom_3_colleague.index[0], bottom_3_colleague.values[0],
bottom_3_colleague.index[1], bottom_3_colleague.values[1],
bottom_3_colleague.index[2], bottom_3_colleague.values[2]
)
How do I format my text to look like the 1st image?


\tTexttablewith no decorations? pypi.org/project/texttable