Skip to content

Instantly share code, notes, and snippets.

@dansku
Created May 1, 2022 02:02
Show Gist options
  • Save dansku/d6d74acf65b12912820858a18171094f to your computer and use it in GitHub Desktop.
Save dansku/d6d74acf65b12912820858a18171094f to your computer and use it in GitHub Desktop.
dic = {
"musicas": [
{"nome": "Hey jude", "banda": "Beatles"},
{"nome": "november rain", "banda": "Gun n' roses"},
{"nome": "How deep is your love", "banda": "Bee Gees"},
],
"filmes": {
"x-men": ["wolvwrine", "xavier", "tempestade", "Vampira", "Magneto", "Ciclope", "Gambit"],
"Avengers": ["Homen de ferro", "Hulk", "Thanos", "Capitão America", "Thor", "Capitã Marvel", "Homem-Aranha"],
"Star Wars": ["Luke", "Leia", "c-3PO", "Darth Vader", "Obi-wan", "Yoda", "R2-D2", "Han solo", "chewbacca"],
}
}
def func1(a, b, c, d):
for x in a:
if x[b] == d:
return x[c]
print(dic['musicas'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment