Select the correct statements regarding the differences between a normal function and a generator function. (select 2)

Questions & AnswersCategory: PythonSelect the correct statements regarding the differences between a normal function and a generator function. (select 2)
Geek Boy Staff asked 2 years ago

Select the correct statements regarding the differences between a normal function and a generator function. (select two)
a. The generator function contains one or more yield statements.
b. There is no difference between a normal function and a generator function.
c. When invoked, the generator function returns an iterable object automatically implementing methods such as __iter__() and __next__().

1 Answers
Geek Boy Staff answered 2 years ago

a. The generator function contains one or more yield statements.
c. When invoked, the generator function returns an iterable object automatically implementing methods such as __iter__() and __next__().