回答編集履歴
2
Update
answer
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
def command1():
|
9
9
|
global abc, flower_text, flower_label
|
10
10
|
text = [t for (t, m, d) in abc if (m, d) == (int(Entry5.get()), int(Entry6.get()))]
|
11
|
-
text = text[0] if
|
11
|
+
text = text[0] if text else '花言葉が見つかりません'
|
12
12
|
flower_text.set(text)
|
13
13
|
flower_label.place(x=650, y=250)
|
14
14
|
return
|
1
Update
answer
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
flower_label = tk.Label(textvariable=flower_text)
|
7
7
|
|
8
8
|
def command1():
|
9
|
-
global flower_text, flower_label
|
9
|
+
global abc, flower_text, flower_label
|
10
10
|
text = [t for (t, m, d) in abc if (m, d) == (int(Entry5.get()), int(Entry6.get()))]
|
11
11
|
text = text[0] if len(text) else '花言葉が見つかりません'
|
12
12
|
flower_text.set(text)
|