What is the difference between `return` and `yield` in Python?
-
A
`return` is for generators; `yield` is for regular functions
-
B
`return` exits the function and returns a value; `yield` pauses execution and produces a value
-
C
They are interchangeable
-
D
`yield` only works inside a class