I'm utilizing Python 2.7 with Autodesk Maya. Here's an example of my issue:
import maya.cmds as m
def a(passedString):
print('this'+passedString)
def b(passedString):
print('that'+passedString)
def c(passedString):
print('notThis'+passedString)
def d(passedString):
print('ofCourse'+passedString)
string1 = [a(),b(),c(),d()]
string2 = [poly1,poly2,poly3,poly4]
for each in string2 and every in string1:
m.select(each)
every(each)
This might seem straight forward, but what I need is to have string2[0] (a function) executed with string1[0] and only string1[0].
Same goes for the next array item. [1] with [1] and [2] with [2] and [3] with [3].
Essentially, I'm trying to cut down on code and simplify how my code executes, as opposed to tediously writing the above code for 20+ individual instances.