Python returning the wrong length of string when using special characters

前端 未结 5 1337
庸人自扰
庸人自扰 2020-12-03 05:48

I have a string ë́aúlt that I want to get the length of a manipulate based on character positions and so on. The problem is that the first ë́ is being counted twice, or I gu

5条回答
  •  独厮守ぢ
    2020-12-03 06:04

    which Python version are you using? Python 3.1 doesn't have this issue.

    >>> print(len("ë́aúlt"))
    6
    

    Regards Djoudi

提交回复
热议问题