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

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -