设置 For 循环中的所有值

Set all the values from a Forloop

我需要将所有值设置到一个 textctrl 中,但它只设置了 las 值

lstA = list(CONTENIDO)
for RT in lstA:
    print RT
    self.loggerb.SetValue(RT)

也许你想要

self.loggerb.SetValue(", ".join(CONTENIDO))

self.loggerb.SetValue("\n".join(CONTENIDO))

或者您可能想要

for RT in CONTENIDO:
    print RT
    self.loggerb.SetValue(RT)
    self.logggerb.Update() # force gui update
    wx.Sleep(1) # wait a second before going to next value