Oussama Hajjaj

Hello , yes it's for my internship and my supervisor asked me to make a script to rename systems in Mechanical as per their name in Workbench system. 

I want ton change it and have some help , noname is the oldname , when using the commands after, i can change it to a newname. i should make the first for loop over a list but in my case it's just over one name of the list and i don't know how to solve it .