How do I combine 2 letters such as क and ख ⟶ क्ख?
What I tried:
'्'.join(['क','ख'])
-> 'क्ख'
print("क"+"\b"+"ख")
-> 'ख' or 'क\x08ख'
print('क'+'्'+'ख')
-> क्ख
print('क्ख'.replace('्',""))
-> कख
I got the answer (soln 1 worked, just had to add # -*- coding: utf-8 -*-
to the top of the file)
(yes, i am the author of the question)
At the top of your python file, add this:
# -*- coding: utf-8 -*-
And then soln. 1 works:
print('्'.join(['क','ख']))
OR this one:
print('न्म'[2].join(['क','ख']))