What is the difference between yield keyword in Python and yield keyword in C#?
yield
C#'s yield return is equivalent to Python's yield , and yield break is just return in Python.
yield return
yield break
return
Other than those minor differences, they have basically the same purpose.