"Dave Angel" <da...@ieee.org> wrote
for text, color in color_items: #3 textcolor(color) #4 print text #5
Ah! Good call, I never thought of unpacking the tuple in the loop. Big improvement.
It would be possible (and maybe even desirable) to write a different function to just take a single string, and parse it for some escape sequence to cause the color changes. But that's not what this one does.
I considered doing that but figured the OP would get even more confused if I tried that! :-)
Alan G. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor