how to handle multiple containers

i was wondering if there is a way to tell touchdesigner in phyton to go from a list of operators and do the same thing by their number or by name, for example if i have 20 operators called: null1, null2, null3, etc to null20, how could i say that when all of those operators are in 0 do something, is there a way? should i convert that data to a table, or should i do variables or is there something like range(19) in phtyon? ive thinking about this for days but i pretty far from solving it

thanks for the help!

Your question isn’t totally clear, but if I understand, you might want something like this:

for compNum in range(20):
	comp = op('null' + str(compNum))

Depending on the naming convention, you can also use the ops function to get them directly:

for comp in ops('null*'):


for comp in ops('null[1-20]'):


Here’s some code I like to use often in a textdat

path = me.parent().findChildren(type=TOP, depth=1)
for x in range( len( path ) ):	
         #If you want to skip certain ops
	#if path[x] != ' ' : #and path[x].base != ' ':
		#Print these ops
		# op(str(path[x])).par.whatever = ......

Also checkout Tags:

You can give any operator one or multiple tags. Together with the findChildren method this is a very powerful and fast way to find a group of nodes and do something with them.

The findChildren method is explained here:

thanks a lot for your answers, ill try them.
And the tag thing its awesome, i didnt know that exist, thank you!