【发布时间】:2015-01-11 03:19:50
【问题描述】:
所以我有一个基本问题:如何在 easyGUI 中正确使用 if 和 else 语句? 这就是我所拥有的:
import easygui
msg = "Oh i see m9, choos your difficulty"
title = "Mountain Dew Franchise"
choices = ["Pro 360 noscoper(+1001)", "Dank skrubl0rd(-666)"]
choice = easygui.ynbox(msg, title, choices)
#if choices==choices[0]:
easygui.msgbox("Good choos m20, let the skrubl0rd noscoping begin.")
#if choices==choices[1]:
easygui.msgbox("Oh i see m8.")
# 行似乎是问题区域
它不会让我去任何一个 msgbox,而是只是关闭程序,任何帮助将不胜感激。
【问题讨论】:
-
使用 easygui 时,if 语句的工作方式与其他任何地方没有任何不同。您应该担心的是您正在检查的值。
标签: python if-statement syntax msgbox easygui