MENU

Fun & Interesting

The quality of life feature you didn't know you needed

Carberra 3,227 2 months ago
Video Not Working? Fix It Now

It might not sound like much, but having dictionaries with defaults (knows as defaultdicts) is genuinely an amazing quality of life feature! On top of that, they're incredibly easy to implement yourself, allowing for some pretty advanced use-cases. 00:00 - Intro 00:42 - Using collections.defaultdict 05:00 - Another example with sets 05:35 - Implementing our own defaultdict 07:35 - Using a custom defaultdict for lazy loading + caching 11:16 - Outro — ~ Hotlinks ~ Join the Discord ► https://discord.gg/5vVgQpK Check out the GitHub ► https://github.com/Carberra ~ Setup ~ Visual Studio Code ► https://youtu.be/PBQspYkkksU Terminal ► https://youtu.be/4RuGK3w6Mbs Desk/recording gear ► https://kit.co/Carberra PC build ► https://uk.pcpartpicker.com/list/TmzGYN ~ Affiliations ~ ChatLLM and CodeLLM ► https://chatllm.abacus.ai/phxDqZSGjZ Codecrafters (40% off any plan) ► https://app.codecrafters.io/join?via=parafoxia Keeper Password Manager (30% off your first year) ► https://keeper.io/r/EX4FB1C #python #coding #howto

Comment