How do I display unicode value stored in a string variable using ord()

Paul Rubin no.email at nospam.invalid
Sat Aug 18 22:11:38 EDT 2012


Chris Angelico <rosuav at gmail.com> writes:
> UTF-8 is highly inefficient for indexing. Given a buffer of (say) a
> few thousand bytes, how do you locate the 273rd character? 

How often do you need to do that, as opposed to traversing the string by
iteration?  Anyway, you could use a rope-like implementation, or an
index structure over the string.



More information about the Python-list mailing list