How to convert a list of edges to a tree in python?
How to convert a list of edges to a tree in python? Question: I am having a list of edges that has the following format: edges=[[1,4],[1,3],[1,2],[3,5],[3,6],[3,7]] Here in each edge the first element is the parent node and the second is a child node i.e, in [1,4]—->(1 is the parent node and 4 is child …