There is a string consisting of numbers and letters of the Russian alphabet. Need to know the index of one of the letters. When using s.find('Н') an error is s.find('Н') .
I use python-2.7 under Ubuntu .
There is a string consisting of numbers and letters of the Russian alphabet. Need to know the index of one of the letters. When using s.find('Н') an error is s.find('Н') .
I use python-2.7 under Ubuntu .
s.find(u'Н') isinstance(s, unicode) - jfsIt is necessary to transfer the input data to unicode. and call the find () function passing it the unicode object as a parameter.
You can see here: https://sites.google.com/site/whitedjango/home/pythonilidjangoproblemaskodirovkoj
string = u'АБВ123' string.find(u'Б') 1 Source: https://ru.stackoverflow.com/questions/54452/
All Articles