Python’s `str.format()`, fill characters, and ANSI colors
问题 In Python 2, I’m using str.format() to align a bunch of columns of text I’m printing to a terminal. Basically, it’s a table, but I’m not printing any borders or anything—it’s simply rows of text, aligned into columns. With no color-fiddling, everything prints as expected. If I wrap an entire row (i.e., one print statement) with ANSI color codes, everything prints as expected. However: If I try to make each column a different color within a row, the alignment is thrown off. Technically, the