Created
November 23, 2022 17:26
-
-
Save carlosm27/4adfa994c7b39b4726d1ca152d210e48 to your computer and use it in GitHub Desktop.
get_item function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_item(id: int, db: list): | |
fruit = {} | |
for dic in db: | |
for val in dic.values(): | |
if val == id: | |
fruit = dic | |
return fruit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment