Nice article, very much looking forward to seeing what 3.10 has to offer 😀
In your dictionary example, you can call .get(key, default) on a dict where default is returned if key isn’t a valid key. It’s great for when you’d otherwise need to handle KeyError
Nice article, very much looking forward to seeing what 3.10 has to offer 😀
In your dictionary example, you can call
.get(key, default)on a dict wheredefaultis returned ifkeyisn’t a valid key. It’s great for when you’d otherwise need to handleKeyErrorGlad you found it helpful, and thank you for additions.