print the graph print(graphwhen the above code is executedit produces the following result{' '[' '' ']' '[' '' ']' '[' ']' '[' ']' '[' '' ']display graph vertices to display the graph verticeswe simple find the keys of the graph dictionary we use the keys(method class graphdef __init__(self,gdict=none)if gdict is nonegdict [self gdict gdict get the keys of the dictionary def getvertices(self)return list(self gdict keys()create the dictionary with graph elements graph_elements " [" "," "]" [" "" "]" [" "" "]" [" "]" [" " graph(graph_elementsprint( getvertices()when the above code is executedit produces the following result[' '' '' '' '' '