I am newly learning Python. In Python we have Iterators and Generators for creating iterators or iterable items. My understanding is we can use Iterators or Generators for creating iterators in any usecase. I could not differentiate any usecase where specially Iterators should be used or only Generators should be used. Why Python has two approaches(Iterators and Generators) for creating Iterators. Is there any reason? In which scenario we need to use Iterators and in which scenario we need to use Generators?
Sorry for asking generic question, since I am newbie I could not understand the concepts in detail.
Thanks