Answer the question
In order to leave comments, you need to log in
How to properly compare lists in Python?
Guys, how to compare words in Python?
If I compare A1 == C1, it will be False. But in fact they seem to be, it’s just that the region is also registered in A1.
Answer the question
In order to leave comments, you need to log in
So compare lists, strings or words?
If you look at a specific screenshot, I see two lines. The string in column C is contained in the string in column A.
Just such an occurrence is easily found by this construction:
string_a = 'Санкт-Петербург, Ленинградская область'
string_b = 'Санкт-Петербург'
print(string_b in string_a)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question