Java iterate nad listą
for (int i = 0; i < crunchifyList.size(); i++) {
System.out.println(crunchifyList.get(i));
}
Dull Dove
for (int i = 0; i < crunchifyList.size(); i++) {
System.out.println(crunchifyList.get(i));
}
>>> list('ATGC')
['A', 'T', 'G', 'C']
my_list = ["Hello", "World"]
for i in my_list:
print(i)
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