What is the difference between yield keyword in Python and yield keyword in C#?
views:
188answers:
2
+12
A:
C#'s yield return is equivalent to Python's yield , and yield break is just return in Python.
Other than those minor differences, they have basically the same purpose.
John Millikin
2009-11-09 23:19:24
+11
A:
This may help you understand it : Iterators in C#, Python, and Ruby
Soufiane Hassou
2009-11-09 23:19:52