I have this basic code in which I'm just trying to compare each tuple in the first list (list1) with the corresponding tuple in the second list (list 2). If the tuple in list 2 is = to the corresponding tuple in list1 minus the '.vbproj'
then take both tuples and return them.
Then I need to print path + the tuple from list2 + the tuple from list1. I'm just stuck on how to do this.
path = "C:\Users\bg\Documents\Brent"
list1 = [ 'Brent.vbproj', 'Chris.vbproj', 'Nate.vbproj']
list2 = ['Brent', 'Chris', 'Nate']
def connect(list1, list2):
for x, y in zip(string[0], string2[0]):
if string(x) is string2(y):
print x
os.path.join(path, x, y)
x = connect(list1, list2)
y = connect(list1, list2)
I thought the zip()
compared both tuples up to the minimal equivalence but I could be wrong?? I don't know, any help would be greatly appreciated. Thanks in advance!
connect
withlist1
andlist2
perhaps? – Martijn Pieters