Write a function that returns a list of all positions of a given character in a string.

Question:

Write a function that returns a list of all positions of a given character in a string. Produce two versions— one with streams and one without. Which one is easier to implement?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: