I'm super amazed using the generator instead of list. But I can't find any solution for this question.
What is the efficient way to get the first and last element from generator items? Because with list we can just do lst[0] and lst[-1]
Thanks for the help. I can't provide any codes since it's clearly that's just what I want to know :)