x = 'An apple a day, keeps the doctor away'

i, j = x.find('a', 0), []
while  i != -1:
	j.append(i)
	i = x.find('a', i+1)
	print(j)