I would use a Python comprehension here and return an array. I don't think that a set is necessary given that we do not list locales multiple times.