print specific key in dictionary python
>>> print(fruit.get('kiwi'))
2.0
print specific key in dictionary python
>>> print(fruit.get('kiwi'))
2.0
print specific key in dictionary python
fruit = {
"banana": 1.00,
"apple": 1.53,
"kiwi": 2.00,
"avocado": 3.23,
"mango": 2.33,
"pineapple": 1.44,
"strawberries": 1.95,
"melon": 2.34,
"grapes": 0.98
}
for key,value in fruit.items():
print(value)
print specific key in dictionary python
>>> print(fruit.get('cherry', 99))
99
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us