Select true statements. (select Two): a. Creating a generator in Python is all about defining a normal function, but with a yield statement instead of return. b. If a function contains one or more yield statements it becomes a generator function.

Questions & AnswersCategory: PythonSelect true statements. (select Two): a. Creating a generator in Python is all about defining a normal function, but with a yield statement instead of return. b. If a function contains one or more yield statements it becomes a generator function.
Geek Boy Staff asked 2 years ago

Select true statements. (select Two):
a. Creating a generator in Python is all about defining a normal function, but with a yield statement instead of return.
b. If a function contains one or more yield statements it becomes a generator function.

1 Answers
Geek Boy Staff answered 2 years ago

a. Creating a generator in Python is all about defining a normal function, but with a yield statement instead of return.
b. If a function contains one or more yield statements it becomes a generator function.