If you want the contents of the variable a
to be shown after Hello World
, try this:
import easygui as eg
a = 4
eg.msgbox(msg='Hello World '+str(a))
In Python the +
sign concatenates strings (so 'a'+'bc'='abc'
) but since a
has an integer value, we call the function str
which converts the 4
to a '4'
so that the +
will receive two strings :)