Navigate Select ESC Close

Advanced Dictionaries: defaultdict in Python

2023-05-24 Science & Technology
35.7k
1.2k
43
NeuralNine
NeuralNine
470.0k subscribers

Unlock all features

FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.

Description

Today we learn about defaultdict and advanced dictionaries in Python. ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾ 📚 Programming Books & Merch 📚 🐍 The Python Bible Book: https://www.neuralnine.com/books/ 💻 The Algorithm Bible Book: https://www.neuralnine.com/books/ 👕 Programming Merch: https://www.neuralnine.com/shop 🌐 Social Media & Contact 🌐 📱 Website: https://www.neuralnine.com/ 📷 Instagram: https://www.instagram.com/neuralnine 🐦 Twitter: https://twitter.com/neuralnine 🤵 LinkedIn: https://www.linkedin.com/company/neuralnine/ 📁 GitHub: https://github.com/NeuralNine 🎙 Discord: https://discord.gg/JU4xr8U3dm

Top Comments (10)

@Revamped1953 2023-07-27

I learned how to use default dictionaries! thanks for these videos again super useful! please don't stop making content!

6
@aflous 2023-05-24

@11:44 you still can have some logic using a callable, no need to inherit from defaultdict

2
@ВладФоменко-р4е 2023-05-24

I just recently run into this defaultdict in my colleague's code, and now you share what it's all about. How's that work?)) Thank you for a great tutorial.

2
@JoseAntonio-jf5lz 2023-05-24

Excellent explanation, thank you very much.

1
@BenKariuki-s7o 2025-01-15

Bro doesn't blink

1
@SolidBuildersInc 2023-05-24

This was a Game Changer on Dictionaries for me. I will read the docs....🎉

0
@Skrattoune 2025-03-07

Learned something about interesting a logic into the default value. Thanks

0
@baberraheem-j3s 2025-07-26

super helpful. thanks man

0
@Alchemist10241 2025-07-30

I couldn’t understand why we even need default dictionaries from your first examples, but the last two really showed how useful they are.

0
@jasonchien5359 2024-05-19

Amazing video regarding the usage of defaultdict, learnt a lot and I see the benefits over the default dictionary compare to defaultdict class. Keep up the good work 👍👍👍

0

Unlock the Data Inside
Turn Videos into Knowledge

  • Get FREE 10/day: transcripts, summaries, chats
  • Chat with videos, export text & PDF
  • $1 free API credit for RAG, chatbots & research

Free forever plan • All features unlocked

App screenshot