Am 12.01.2014 08:50 schrieb wxjmfa...@gmail.com:
sys.version2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]s = 'Straße' assert len(s) == 6 assert s[5] == 'e'
Wow. You just found one of the major differences between Python 2 and 3.Your assertins are just wrong, as s = 'Straße' leads - provided you use UTF8 - to a representation of 'Stra\xc3\x9fe', obviously leading to a length of 7.
Thomas -- https://mail.python.org/mailman/listinfo/python-list