How to eliminate {} brackets from message box
I have script like this:
rp_1st_name = 1000
rp_last_name = 2000
rp_1st_val = 5555
rp_last_val = 6666
fdh = 200
dif = (rp_1st_val - rp_last_val) - fdh
teor = rp_1st_val - rp_last_val
开发者_如何学JAVAm1='wysokosc reperu poczatkowego:',rp_1st_val,'mm \n'
m2='wysokosc reperu koncowego:',rp_last_val, 'mm \n'
m3='przwyzszenie na ciagu: \n'
m4='teoretyczne =',teor,'mm \n'
m5='obliczone = ',fdh,'mm \n'
m6='fdh =',dif,'mm \n'
from easygui import *
msgbox((m1, m2, m3, m4, m5, m6),"SUMMARY", ok_button="Exit")
How to make {} brackets were not displayed in message box?You seem to think that
myvar = "String",value,"more string"
results in a string (String 5 more string
) but it doesn't -
it gives you a tuple (("String", 5, "more string")
)
Instead, try one of
myvar = "String " + str(value) + " more string" # string concatenation
myvar = "String %d more string" % (value,) # old-style string formatting
myvar = "String {0} more string".format(value) # new-style string formatting
精彩评论