回答編集履歴
1
追記
answer
CHANGED
@@ -22,4 +22,19 @@
|
|
22
22
|
2: {'Answer': 'A田A雄', 'Question': '年は?'},
|
23
23
|
3: {'Question': '住所は?'}}
|
24
24
|
"""
|
25
|
+
```
|
26
|
+
|
27
|
+
回答済みかどうか判断するのも簡単です。
|
28
|
+
```Python
|
29
|
+
def is_already_answered(dict_arg):
|
30
|
+
return 'Answer' in dict_arg
|
31
|
+
|
32
|
+
for key, value in quiz_dict.items():
|
33
|
+
print('{0}: {1}'.format(key, is_already_answered(value)))
|
34
|
+
|
35
|
+
"""出力
|
36
|
+
1: False
|
37
|
+
2: True
|
38
|
+
3: False
|
39
|
+
"""
|
25
40
|
```
|