all iteration in list code example
Example 1: list iteration
>>> list('ATGC')
['A', 'T', 'G', 'C']
Example 2: list iteration
def count_v1(dna, base):
dna = list(dna) # convert string to list of letters
i = 0 # counter
for c in dna:
if c == base:
i += 1
return i