Incrementing Variables In Expressions

Hey, I'm trying to work out how to increment floats in expressions...

CODE
import maya.cmds as mc
#---------------------
for i in range(0,10,1):
    exp = 'float $vel' + '%d' + '[];\n' % i

    mc.expression(s=exp, name='expTest')

I'm getting this error...

# TypeError: not all arguments converted during string formatting #

Any help on this one would be great

Chris

You can leave out the + signs

Use
[codebox]
exp = 'float $vel' '%d' '[];\n' % i[/codebox]

instead

Michiel
http://mayastation.typepad.com

or put parenthesis around

the % operation works on strings but in your case it works on the LAST string piece

why not just simply type..

CODE
exp = 'float $vel%d[];\n' % i