diff --git a/diy1.py b/diy1.py index 49b457d..a260816 100644 --- a/diy1.py +++ b/diy1.py @@ -12,4 +12,10 @@ dict_hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30} print(dict_hero) print(dict_hero['猴队长']) = 50 -print(dict_hero) \ No newline at end of file +print(dict_hero) +dict_hero['猴二'] = 15 +print(dict_hero) +if '猴二' in dict_hero: + print('yes') +else: + print('no') \ No newline at end of file