python - How to correctly change the line in easygui's msgbox? -
when changed msgbox in easygui line, got str error.
typeerror: can concatenate tuple (not "str") tuple
and code this.
import datetime,easygui d1 = datetime.datetime(2017, 8, 29) d2 = datetime.datetime.now() calc = (d1 - d2).days last = calc+1 = "you have",last,"days" b = "don't worry" easygui.msgbox(a+'\n'+b)
i tried change last line of output code a+'\n'+b a,'\n',b
but output not want. easygui identifies parameters behind comma confirmation button!
thanks help!
i found way solve problem. change last line this.
easygui.msgbox("you have " + str(last) + " days" + "\ndon't worry", "info")
Comments
Post a Comment