ok... I have 0 background in coding Im starting fresh, i want a script to create a random number and taking this random number and putting it in between the two _ like Name_RandNum_High / Name_RandNum_low
dont mind that the two number are the same there suppose to be different
and so far my code look like this:
maya.cmds as cmds
import random
random.seed()
randVar = random.randrange(10000,20000)
#create random number
print randVar
mesh = cmds.ls(sl=True)
#create a list of the mesh selected
print mesh
and i dont know how to continue plz yelp
and if i dont make any sense plz tell me
Replies
https://docs.python.org/2/library/string.html#string-functions
string concatenation is done with + so once you've split it at whatever separator you decide to use you can simply do this...
newstring = splitString[0] + random + splitString[1]