Last active
September 19, 2021 19:07
-
-
Save andrsGutirrz/d3fa0341e2289d35460e935fcd4d151b to your computer and use it in GitHub Desktop.
Redability_3
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_laptop_not_sugar(payload: dict) -> List: | |
response = [] | |
items = payload.get("items") | |
if items: | |
for item in items: | |
memories = item.get("memory", []) | |
processors = item.get("processor", []) | |
for memory in memories: | |
if memory.get("size") == 16: | |
for processor in processors: | |
if (processor.get("make", "").upper() == "RYZEN") and item not in response: | |
response.append(item) | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment