Created
July 21, 2020 05:23
-
-
Save kshirsagarsiddharth/0fc80a074e583b0e380e1e10e37b0651 to your computer and use it in GitHub Desktop.
combining
This file contains hidden or 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
| import unicodedata | |
| s3 = "tête-à-tête" | |
| s4 = unicodedata.normalize('NFD',s3) | |
| print(len(s3) == len(s4)) | |
| # Output: False | |
| [val for val in s4 if unicodedata.combining(val)] | |
| # Output: ['̂', '̀', '̂'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment