2013-11-26 131 views
0

我想将for循环的输出逐步写入名为word的变量中。 for循环是这样的:python:如何将for循环输出写入变量

text = visual.TextStim(win=win, units='pix', height=20, font='Courier')  
for i in range(len(word)):#calls upon the number of letters within a word 
       text.setText(word[i])#addresses a letter within a word 
       text.setPos()#give the letter a certain position on the screen 
       word=... 

我想写出每个字母一个一个的变量称为字。我怎样才能做到这一点?

任何帮助,非常感谢。

回答

0

字母= [ 'A', 'B', 'C']

对于i在字母: 字=字+ I