Skip to content

Instantly share code, notes, and snippets.

@andrsGutirrz
Last active September 19, 2021 19:07
Show Gist options
  • Save andrsGutirrz/d3fa0341e2289d35460e935fcd4d151b to your computer and use it in GitHub Desktop.
Save andrsGutirrz/d3fa0341e2289d35460e935fcd4d151b to your computer and use it in GitHub Desktop.
Redability_3
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