Skip to content

Instantly share code, notes, and snippets.

@andrsGutirrz
Created September 19, 2021 18:54
Show Gist options
  • Save andrsGutirrz/6dcf3c5a994d2ae803d854dc22987a93 to your computer and use it in GitHub Desktop.
Save andrsGutirrz/6dcf3c5a994d2ae803d854dc22987a93 to your computer and use it in GitHub Desktop.
Redability_1
def get_laptop_sugar_1(payload: dict) -> List:
return list(filter(lambda l:
list(filter(lambda ll: ll.get("size") == 16, l.get("memory", [])))
and
list(filter(lambda ll: ll.get("make", "").upper() == "RYZEN", l.get("processor", [])))
,
payload.get("items", [])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment