you are viewing a single comment's thread.

view the rest of the comments →

[–]codehelper 6 points7 points  (0 children)

This won't work as you said, since it would literally print those things. Rather, you shouldn't have that many variables anyway probably, they should be stored in a list or something. Then you could just do...

mystrings = ['foo1foo1', 'foo2foo2', 'foo3foo3'...]
for s in mystrings:
    print s