can we write a code which gets a list of values as input and automatically sets each value as output
thank you all
See this answer on a related discussion. I do not suggest you go down this path, but rather use the Tree BANG! component, that David keeps up-to-date for you.