suppose that I have a list "graph" initialised as follows.
graph = [[1, 2, 3], [2, 3, 4], [3, 5, 7]]
How would I then determine if 1 was in graph?
Is there a simpler, more optimized way than doing something like,
in_graph = False
for row in graph:
if 1 in row:
in_graph = True
break
?
Thank you,
hob