Python function for displaying a list of dictionaries in table format
I just spent like 2 hours writing this function, but it was worth it!
This cut down a lot of duplicate code on the project I'm working on. I figured I'd post it here in case someone is trying to do the same thing. I'm sure my code is not optimal so if you have any suggestions on how to improve it please feel free to comment :).
from operator import itemgetter def format_as_table(data, keys, …