title: increment values in maya python
body: <pre><code>randoms = [rand.uniform(-1,1)for items in range(10)]
  x= 0
  for i in List:
      cm.setKeyframe(at = "%s.cv[x].xValue"%i , t=5, v=rand.choice(randoms))
      x+=1
  </code></pre>
  
  <p>this part of code that i wanna use,  but maya can't accept this [x].
  someone told me you should do this:</p>
  
  <pre><code>for i in List:
      x = 0
      cvAttrX = i+".cv["+str(x)+"].xValue"
      cm.setKeyframe(at = cvAttrX , t=5, v=rand.choice(randoms))
      x+=1
  </code></pre>
  
  <p>but i got this error:</p>
  
  <pre><code># Error: line 1: can only concatenate list (not "str") to list
  # Traceback (most recent call last):
  #   File "&lt;maya console&gt;", line 1, in &lt;module&gt;
  #   File "&lt;maya console&gt;", line 7, in randList
  # TypeError: can only concatenate list (not "str") to list #
  </code></pre>
  
  <p>if someone fix this please explain that deeply to me.
  i wanna learn this one very good 
  and please fix this example too:</p>
  
  <pre><code>randoms = [rand.uniform(cm.floatField(Ceil, q = True , v = True),0.5)for i in range(30)]
      for objects in myList:
          cm.xform('%s.cv[0]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
          cm.xform('%s.cv[1]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
          cm.xform('%s.cv[2]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
          cm.xform('%s.cv[3]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
          cm.xform('%s.cv[4]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
          cm.xform('%s.cv[5]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
          cm.xform('%s.cv[6]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
          cm.xform('%s.cv[7]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
          cm.xform('%s.cv[8]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
          cm.xform('%s.cv[9]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
          cm.xform('%s.cv[10]'%objects , r = True , t = [(rand.choice(randoms)),(rand.choice(randoms)),(rand.choice(randoms))])
  </code></pre>
  
  <p>this is a part of my script if i can do increment i don't wanna write this line for exampla 100 time, i can make intField for that and determine how many do i need</p>
  
  <p>i wanna do something like this but i don't know how</p>
  
  <pre><code>import maya.cmds as cm
  import random as rand
  myList = cm.ls(sl =True)
  cvList = []
  randomList = []
  def Lister():
  for i in myList:
      cvList.append(cm.ls('%s.cv[:]'%i , flatten = True))
      return cvList
  def randomize():
      x = 0 
      randomList.append([rand.uniform(-1,1)for items in range(10)])
      for i in cvList:
          cm.setKeyframe(at = "%s.cv[x].xValue"%i , t=5, v=rand.choice(randoms))
          x+=1
  </code></pre>