I have a problem.
I have an product.address like this 'UK some city some road'
And I want to compare this address,if it is start with UK or US or AS or GE
I will save product.dstore_id = 2,otherwise, save product.dstore_id = 1
My code is like this:
area = [UK,US,AS,GE]
for i in area:
if i in product.address:
product.dstore_id = 2
else:
product.dstore_id = 1
But I found this has a big problem,it will compare all the i and save the wrong number
So how can I do to reach it . Please guide me a bit Thank you