A utility function to print the adjacency list representation of graph
def print ( self ) : NEW_LINE INDENT for i , adjlist in sorted ( self . graph . items ( ) ) : NEW_LINE INDENT print ( " Adjacency ▁ list ▁ of ▁ vertex ▁ " , i ) NEW_LINE for j in sorted ( adjlist , reverse = True ) : NEW_LINE INDENT print ( j , end = " ▁ " ) NEW_LINE DEDENT print ( ' ' ) NEW_LINE DEDENT DEDENT