Looks like in the latest (1.4) release the .reverse() not working as expected, and because of this is the last() and the last_or_default() functions do not return the desired value. Below is an example.
>>> from py_linq import Enumerable
>>> e = Enumerable([1,2,3])
>>> print(e)
[1, 2, 3]
>>> print(e.reverse())
[1, 2, 3]
>>> print(e.last())
1
Looks like in the latest (1.4) release the
.reverse()not working as expected, and because of this is thelast()and thelast_or_default()functions do not return the desired value. Below is an example.