15,746,202 members
See more:
```# evenList = ['GAAGCTCG', 'AAATTT', 'CTCTAGGAC']
# oddList = ['CCTCGGGA', 'GGGCCC', 'GAGTACCTG']

def matchList(evenList, oddList, integ):
indexElement = 0
indexList = 0
totalIndexSeq = []
acceptableList = ['AT', 'TA', 'at', 'ta', 'GC', 'CG', 'gc', 'cg']

for x in evenList:
indexedSeq = ''

for y in x:
if y + oddList[indexList][indexElement] in acceptableList:
indexedSeq += str(indexElement)
else:
indexedSeq += "+"
indexElement += 1

indexList += 1
indexElement -= indexElement
totalIndexSeq.append(indexedSeq)
# This is what is returned:
# ['0+234+6+']
# ['0+234+6+', '++++++']
# ['0+234+6+', '++++++', '012++5678']```

What I have tried:

I'm new to coding and just now learning recursion. Any tips and/or advice would be appreciated.
Posted
Updated 20-Apr-19 15:58pm
Richard MacCutchan 21-Apr-19 4:55am
Same comment as in your other question. Recursion is not a universal solution to every problem.

## Solution 1

Quote:
I'm new to coding and just now learning recursion.

First of all, you need to learn what is recursive, how to recognize a recursive problem/algorithm. When a problem os not recursive by nature, it is a no go.
"Recursion occurs when a thing is defined in terms of itself or of its type."
Recursion - Wikipedia[^]
Quote:
How do I perform this function recursively?

Not all problems are defined in terms of recursive, and I don't see anything recursive in this code.