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