I'm using python 3.5.1 both on windows 10 and ubuntu 14.04 LTS. I have a list that contains more than one million string items in it. Items are unicode strings of Turkish words. I check the existence of some strings in that list using the in operator. Most of the answers are correct. However some strings return False, even they exist in the list. I tried the same cehecks after converting the list to a set. But nothing changed. What can I do to obtain correct results. Thanks.
I am using utf-8 encodings everywhere.
Problem solved. But, it was not a list problem. In order to prepare the list, I was reading the related file line by line, stripping it and appending to the list. In that process some of the items are lost. I don't know the reason yet. But the following lines create the exact list without any loss: