Hello I need help counting the number of words that begin with the letter 'a' where we store in num_with_a and 'd' where we store in num_with_d from a given book_excerpt.
book_excerpt = "It was both the greatest and worst of times; it was the Age of Wisdom and the Age of Folly; it was the Epoch of Belief and the Epoch of Skepticism; it was the Age of Light and the Age of Darkness; it was the Spring of Hope and the Winter of Despair."
This is what I tried:
num_with_a = for f in book_excerpt:
if beginning 'a' in f:
print(f)
num_with_d = for f in book_excerpt:
if beginning 'd' in f:
print(f)