#Getting the last item of a large iterator
8 messages · Page 1 of 1 (latest)
Don't use iterators if you only care about the last item?
I guess then I might have to find a different way to reach my result.
Yup, don't think using an iterator is the right thing here. How is the iterator computed?
gen=nx.shortest_simple_paths(G,source=start,target=end) networkx library. I have to find the last item which is the one with longest path.
I've seen this but my graph isn't directed but there might be way around. I'll give it a go.