简体   繁体   English

如何从消息框中消除{}括号

[英]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

m1='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 - 产生一个字符串(另外String 5 more string ),但是不会-
it gives you a tuple ( ("String", 5, "more string") ) 它给你一个元组( ("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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM