I am trying to print out emojis as a table using tabulate
, but not getting the right alignment. How can I fix that?
emojis = [['🍌', '🥕', '🥕', '🍎', '🍌', '🍎', '🦸'], ['🍌', '🍎', '🚫', '🚫', '🍎', '🚫', '🍎'], ['🥑', '🍎', '🥕', '🚫', '🚫', '🥑', '🚫'], ['🥕', '🍎', '🥑', '🚫', '🍎', '🍎', '🥕'], ['🥕', '🍌', '🚫', '🍎', '🥕', '🥕', '🍌'], ['🚫', '🍎', '🥕', '🥑', '🥕', '🥕', '🍌'], ['🧛', '🥑', '🚫', '🍎', '🥕', '🚫', '🥕']]print(tabulate(emojis, tablefmt="fancy_grid"))
This is the output:
╒═══╤═══╤═══╤═══╤═══╤═══╤═══╕│🍌│🥕│🥕│🍎│🍌│🍎│🦸│├───┼───┼───┼───┼───┼───┼───┤│🍌│🍎│🚫│🚫│🍎│🚫│🍎│├───┼───┼───┼───┼───┼───┼───┤│🥑│🍎│🥕│🚫│🚫│🥑│🚫│├───┼───┼───┼───┼───┼───┼───┤│🥕│🍎│🥑│🚫│🍎│🍎│🥕│├───┼───┼───┼───┼───┼───┼───┤│🥕│🍌│🚫│🍎│🥕│🥕│🍌│├───┼───┼───┼───┼───┼───┼───┤│🚫│🍎│🥕│🥑│🥕│🥕│🍌│├───┼───┼───┼───┼───┼───┼───┤│🧛│🥑│🚫│🍎│🥕│🚫│🥕│╘═══╧═══╧═══╧═══╧═══╧═══╧═══╛