【发布时间】:2019-07-21 03:06:55
【问题描述】:
在这段代码中:
#! street.py
# A simple program which tests GUI
import easygui
easygui.msgbox("This programe asks for your info and stores them")
name = easygui.enterbox("What is your name?")
hNumber = easygui.enterbox("What is your house number")
street = easygui.enterbox("What is your post number?")
city = easygui.enterbox("What is your city?")
country = easygui.enterbox("What is your country?")
easygui.msgbox(name +
hNumber +
street +
city +
country)
我的最后一个窗口有问题(easygui.msgbox(....),我想在一个窗口的不同行显示所有信息,但我只能让它显示在一行。\n 和类似的不起作用。
【问题讨论】:
-
我认为你需要传递
msgbox()列表中的字符串,例如easygui.msgbox([name, hNumber, street, city, country])。