This code is given in python official essays on graph theory. Here\'s the code:
def find_all_paths(graph, start, end, path=[]):
path = path + [start]
Yes, this algorithm is indeed a DFS. Notice how it recurses right away (go into the child) when looping over the various nodes, as opposed to a Breadth First Search which would basically make a list of viable nodes (e.g. everything on the same level of depth, a.k.a. siblings) and only recursing when those do not match your requirements.