Created
November 10, 2019 16:37
-
-
Save pombredanne/7c97c3e437c80f3e858db5fe836a0c95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> len('İ') | |
1 | |
>>> len('İ'.lower()) | |
2 |
Author
pombredanne
commented
Nov 10, 2019
•
>>> pat=re.compile('[^_\\W]+\\+?[^_\\W]*')
>>> q='İ'
>>> found = [m.lower() for m in pat.findall(q)]
>>> lowered=[m for m in pat.findall(q.lower())]
>>> found == lowered
False
>>> found
['i̇']
>>> lowered
['i']
>>> lowered == ['i']
True
>>> found == ['i']
False
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment