I am trying to match two strings, Serhat Kılıç
and serhat kilic
. In SQL this is quite easy, as I can do:
select name from main_creditperson where name = 'serhat kılıç'
union all
select name from main_creditperson where name = 'serhat kilic';
===
name
Serhat Kılıç
Serhat Kılıç
In other words, both names return the same result. How would I do a string equivalent in python to see that these two names are 'the same' in the SQL sense. I am looking to do something like:
if name1 == name2:
do_something()
I tried going the unicodedata.normalize('NFKD', input_str)
way but it wasn't getting me anywhere. How would I solve this?