Can I safely remove all u-strings from a project that will only use python 3?

I work on a project that includes many u"string" in its codebase,

I want to know if I can safely remove the u in front of all those strings knowing that the project will only use Python 3 from now on (it used to use both python 2 and 3)

I have only one source that says :

"The string prefix u is used exclusively for compatibility with Python
2."

>Solution :

Yes. I think you can. Unicode strings are not necessary in Python 3, because all strings are stored as Unicode by default, as stated here.

Leave a Reply