By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,592 Members | 1,651 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,592 IT Pros & Developers. It's quick & easy.

Re: Unicode Problem

P: n/a
On Thu, 30 Oct 2008 10:28:39 +0300, Seid Mohammed wrote:
I am new to python.
I want to print Amharic character using the Python IDLE. here goes
somple code
================================================== ============
>>>abebe = '*** *ሶ *ላ'
abebe
'\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0 \xe1\x89\xa0\xe1\x88\xb6
\xe1\x89\xa0\xe1\x88\x8b'
>>>print abebe
*** *ሶ *ላ
>>>abeba = ['***','*ሶ','*ላ'] abeba
['\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0', '\xe1\x89\xa0\xe1\x88\xb6',
'\xe1\x89\xa0\xe1\x88\x8b']
>>>print abeba
['\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0', '\xe1\x89\xa0\xe1\x88\xb6',
'\xe1\x89\xa0\xe1\x88\x8b']
>>>len(abebe)
23
========================
so my question is
1)why >>abebe prints '\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0
\xe1\x89\xa0\xe1\x88\xb6 \xe1\x89\xa0\xe1\x88\x8b' instead of *** *ሶ *ላ
2) why >>print abeba don't print the expected *** *ሶ *ላ string thanks
a lot.
Because lists represent their content in the `repr()` form. So you, the
programmer, can see what's really in there.

Ciao,
Marc 'BlackJack' Rintsch
Oct 30 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.