TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: FlexDict – Deeply Nested Python Dictionaries with Ease

16 pointsby berkayozturkover 5 years ago

1 comment

lrobinovitchover 5 years ago
This is cool! Would easily replace the slightly tricky to grok code I came across to make a binary trie last week:<p><pre><code> # in for loop: node = trie for char in number: node = node.setdefault(char, {}) </code></pre> (from here: <a href="https:&#x2F;&#x2F;www.hackerrank.com&#x2F;challenges&#x2F;maximum-xor&#x2F;forum" rel="nofollow">https:&#x2F;&#x2F;www.hackerrank.com&#x2F;challenges&#x2F;maximum-xor&#x2F;forum</a>)