List connection


#1

Hi everybody,
I’m sorry to post a stupid question this, i am new in script…
I want to connect 2 list but in particular order:

import maya.cmds as mc

testA = [‘allo0’, ‘allo1’, ‘allo2’]
testB = [‘bye0’ , ‘bye1’, ‘bye2’]

I want to have this in a loop, that have effect to link :

allo0bye0
allo1bye1
allo2bye2

I try many tricks as enumerate, for i in range, but i havent what i want.
Thanks you very much!


#2
import pymel.core as pm
testA = ['allo0', 'allo1', 'allo2']
testB = ['bye0' , 'bye1', 'bye2']

for a, b in zip(testA, testB):
    print a+b

#3

It’s not bothering anybody, but just FYI for non-Maya specific Python questions you’re probably better off on a general programming site like StackOverflow.