Search code examples
pythonunicodepython-idle

Unicode characters in IDLE


I am just learning python. I read about Unicode characters and strings and was trying to print out a recently introduced symbol as mentioned here - http://www.fileformat.info/info/unicode/char/20b9/index.htm

However my attempt in the IDLE prompt:

u"\u20b9"

just echoes the same expression instead of producing the character. I am not sure if this is a problem with fonts or Unicode versions or if I am doing something wrong. Please help!


Solution

  • It should work perfectly fine: print u"\u20b9"

    I'm guessing you were only typing u"\u20b9" without the print function.