Skip to content

Instantly share code, notes, and snippets.

@kshirsagarsiddharth
Created July 21, 2020 05:23
Show Gist options
  • Select an option

  • Save kshirsagarsiddharth/0fc80a074e583b0e380e1e10e37b0651 to your computer and use it in GitHub Desktop.

Select an option

Save kshirsagarsiddharth/0fc80a074e583b0e380e1e10e37b0651 to your computer and use it in GitHub Desktop.
combining
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