Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: Printing unicode characters beyond FFFF

On Python 3 printing unicode characters can be printed like this:

print('\uFFFF')

But how can I print higher unicode characters like 001FFFFF? print('\u001FFFFF') will just print 001F as unicode character and then 4 times F. Trying to use print('\u001F\uFFFF') will result in 2 unicode characters instead of the wanted one. Is it possible to print somehow the unicode character 001FFFFF in Python 3?


1 Answers

Use an upper-case U.

print('\U001FFFFF')
like image 85
Mark Ransom Avatar answered Sep 13 '25 11:09

Mark Ransom