Home > database >  Displaying Special Characters Using Unicode
Displaying Special Characters Using Unicode

Time:11-16

I want to know how to type a special character "Cherry" like the fruit. I got the Unicode string and attempted to display it, but for some reason it sees the 2 within \u1F352 as part of the string and not the Unicode sequence, so it displays something completely different: ἵ2.

import sys
print('\u1F352')

CodePudding user response:

Using the unicode escape:

>>> print("\U0001F352")
           
  • Related