[Tutor] how to print a string in desired colour

bob gailer bgailer at gmail.com
Sun Feb 12 14:19:07 CET 2012


Please always tell us which OS you are using, which version of Python.

When something you try does not give you the result you want, please 
tell us what you got.

In a case like this also tell us where you want the colored text to 
appear. It may be obvious to you but it is not to us.

Given how long you've been on this list I'd think you'd know all that by 
now.

On 2/12/2012 7:47 AM, Debashish Saha wrote:
> suppose i want to print 'hello world' in color blue.so what to do?
Ths stupid answer is "take a blue marker and write 'hello world'"
>
> i tried
> print 'hello world','blue'

Where did you get the idea that that would do what you want????? Did you 
read the documentation regarding print? Please do not post stuff that is 
obviously wrong!

No one can tell you how to create colored output until we know where you 
are trying to get it to display.


-- 
Bob Gailer
919-636-4239
Chapel Hill NC



More information about the Tutor mailing list