COUNTRIES = ('AF', 'Afghanistan'), ('AX', '\xc5land Islands'), ('AL',
    'Albania'), ('DZ', 'Algeria'), ('AS', 'American Samoa'), ('AD',
    'Andorra'), ('AO', 'Angola'), ('AI', 'Anguilla')
print(next((country for code, country in COUNTRIES if code == 'AD')))
Getting an element from tuple of tuples in python