I have two unicode string '가'
and 'ㄱ'
and I want to concatenate them to get "가ㄱ"
This is my code:
output1 = unicodeQueue(self.queue) # first unicode result
output2 = unicodeQueue(self.bufferQueue) # second unicode result
sequence = [output1, output2]
print sequence
output = ''.join(sequence)
return output
And this is the output I'm getting:
[u'\uac00', u'\u3131']
ㄱ가가ㄱ가
I don't know why it doesn't produce correct result, can anyone help me with this?
if you want to concatenate two strings use +
>>> '가' + 'ㄱ'
'\xea\xb0\x80\xe3\x84\xb1'
>>> u'가' + u'ㄱ'
u'\uac00\u3131'
>>> print u'가' + u'ㄱ'
가ㄱ
this means you can use
output1 + output2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With