Here below is a simple program to display data (list or list of dictionaries) in a tabular format using the “tabulate” package.
This is the required output:
If you don’t have the “tabulate” package installed, you can install it using:
pip install tabulate
Following is the program code:
Following is a sample run of the above program: