title: Replacing characters in renaming
body: <p>I am trying to do a simple Maya renaming UI but I am stuck at a part - replacing  he initial characters in the current naming with other characters</p>
  
  <p>For example; 3 items in the Outliner(irregardless of what they are):- pCube1, - pSphere1, - nurbsSphere1</p>
  
  <p>So far I am able to write up to the point where it can selects and rename 1 or more objects, see code below</p>
  
  <pre><code>objects = []
  objects = cmds.ls(sl=True)
  for obj in objects:
      test = []
      test = cmds.rename(obj, "pSphere" )
      print objects
      # Results: pSphere, pSphere2, pSphere3 #
  </code></pre>
  
  <p>However, suppose now I am selecting nurbsSphere1 and pSphere1, and I just wanted to  replace the word 'Sphere' in them with 'Circle', instead of getting the results as: <code>nurbsCircle1, pCircle1</code>, I got a error message <code># TypeError: Too many objects or values. #</code> </p>
  
  <pre><code>charReplace = "test"
  if charReplace in objects:
      newName = []
      newName = cmds.rename(objects, "Circle" )
  </code></pre>
  
  <p>Any advices on it?</p>