human
DFS for a n | DFS on tree.
Printing traversed node.
Traversing adjacent edges.
Not traversing the parent node.
Driver Code.
Number of nodes.
Adjacency List.
Designing the tree.
Function call"
How can the above be solved in Python?

=====
Can you provide a code to dFS for a n and the other steps required?
assistant
#Here is code to dFS for a n and the other steps required.
 def dfs ( List , node , arrival ) :
	print ( node )
	for i in range ( len ( List [ node ] ) ) :
		if ( List [ node ] [ i ] != arrival ) :
			dfs ( List , List [ node ] [ i ] , node )
if __name__ == ' _ _ main _ _ ' :
	nodes = 5
	List = [ [ ] for i in range ( 10000 ) ]
	List [ 1 ] . append ( 2 )
	List [ 2 ] . append ( 1 )
	List [ 1 ] . append ( 3 )
	List [ 3 ] . append ( 1 )
	List [ 2 ] . append ( 4 )
	List [ 4 ] . append ( 2 )
	List [ 3 ] . append ( 5 )
	List [ 5 ] . append ( 3 )
	dfs ( List , 1 , 0 )