Search code examples
python-3.xpython-unicode

How to print Marathi characters "" in Python?


I want to print some Marathi language characters in Python. Here's my code.

print(u'*********************************भाई पायथॉन शिकतोय***************************')
print("*********************************************************************************************************")

The output I get is: Output of code

What do I need to change to make it work?


Solution

  • Please try with encoding at top of script as 'utf-8'

    # -*- coding: utf-8 -*-
    print(u'*********************************भाई पायथॉन शिकतोय***************************')
    print("*********************************************************************************************************")