def list3(strs):
result = 0
for i in strs:
if i == 'a':
result += 1
return result
| Function Call | Return Value | |||
|---|---|---|---|---|
| list3(['Hello', 'world', 'a']) | → | |||
| list3(['a', 'a']) | → | |||
| list3(['Computational', 'thinking']) | → | |||
| list3(['a', 'A', 'A']) | → | |||
Experiment with this code on Gitpod.io