I have the following statement in a python routine:
return [hulls[h][i] for h, i in hull]
And I can’t figure out what it does actually return.
I mean, hulls is a list of hull, so ‘hulls[n]’ is of type ‘hull’. Additionally, hull is of type ‘Point’ hull is a list of points, but
for h, i in hull?
The docs don’t mention why and how you can perform such a call, and it smells like some sort of list comprehension call, but I still can’t read that syntax properly.
So I’d like help in understanding how you can translate the sentence in pseudocode, or c#
Thanks a lot.
Yes, it is list comprehension. Your return statement could be rewritten less compactly as: