I am trying to find if a selected country is in a list of tuples by using the following command in my view:
if second_tier.profile.country in COUNTRIES:
if I print second_tier.profile.country I have CA
and when I print COUNTRIES I get:
(('GB', 'United Kingdom'), ('AU', 'Australia'), ('AT', 'Austria'), ('BE', 'Belgium'), ('CA', 'Canada'), ('DK', 'Denmark'), ('FI', 'Finland'), ('FR', 'France'), ('DE', 'Germany'), ('HK', 'Hong Kong'), ('IE', 'Ireland'), ('IT', 'Italy'), ('LU', 'Luxembourg'), ('NL', 'Netherlands'), ('NZ', 'New Zealand'), ('NO', 'Norway'), ('PT', 'Portugal'), ('SG', 'Singapore'), ('ES', 'Spain'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('US', 'United States'))
So the if statement is supposed to return True, however it comes back as False.