Mike Driscoll (@driscollis) 's Twitter Profile
Mike Driscoll

@driscollis

$PYTHAI | Lead Developer @ThePSF #Python

ID: 19067150

linkhttps://www.blog.pythonlibrary.org/ calendar_today16-01-2009 13:57:49

41,41K Tweet

126,126K Takipçi

985 Takip Edilen

Mike Driscoll (@driscollis) 's Twitter Profile Photo

Python 101 - There are two ways to access values in #Python dictionaries 🐍 - Use dictionary access via square braces 🐍 - Use the dictionary's get() method If the key does not exist, the first method will raise a KeyError. You can use get() to return a default instead

Python 101 - There are two ways to access values in #Python dictionaries

🐍 - Use dictionary access via square braces
🐍 - Use the dictionary's get() method

If the key does not exist, the first method will raise a KeyError. You can use get() to return a default instead