Advertisement
Guest User

Untitled

a guest
Dec 15th, 2022
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. all_cont=['Africa','Americas','Asia','Europe','Oceania']
  2. def all_continents(lst):
  3. g = sorted(map(lambda x: x[0],
  4. groupby(lst,key=lambda x:x['continent'])))
  5. return all_cont == g if True else False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement