mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-14 07:00:51 -04:00
fix(curriculum): correct grammar in dictionaries lecture (#64393)
This commit is contained in:
@@ -81,7 +81,7 @@ print(pizza['name']) # 'Margherita'
|
||||
|
||||
Dictionaries also have helpful methods to perform common operations.
|
||||
|
||||
The `.get()` method retrieves the value associated with a key. It's similar to the bracket notation that we just used, but its advantage is that you can set a default value, so you won't get an error is the key doesn't exist:
|
||||
The `.get()` method retrieves the value associated with a key. It's similar to the bracket notation that we just used, but its advantage is that you can set a default value, so you won't get an error if the key doesn't exist:
|
||||
|
||||
```python
|
||||
dictionary.get(key, default)
|
||||
|
||||
Reference in New Issue
Block a user