title: Eulerian Circuit Recursion statement resetting my list
body: <pre><code>def eulerian_circuit(graph):
  
      trail = []
  
      for edge in graph:
          graph.sort()
          a,b = edge 
          if not trail:
              trail.append(a)
              trail.append(b)
              graph.remove((a,b))
              print(graph)
          if a == trail[-1]:
              trail.append(b)
              graph.remove((a,b))
              print(graph)
          if not graph:
              return trail
  
      eulerian_circuit(graph)            
      return trail,graph           
  
  eulerian_circuit([('a','b'), ('b','c'), ('a','f'), ('b','d'), ('d','f'), ('b','e'), ('e','g'), ('c','g'), ('f','g'), ('f','h'), ('g','h')])
  </code></pre>
  
  <p>My problem is that when I call the recursion eulerian_circuit(graph)</p>
  
  <p>my trail resets at the top with trail = []. How do I get around this?</p>
  
  <p>(code is unfinished for circuit answer, still have to implement when theres one edge left to connect back to the starting vertex... and have to figure out other errors i'm sure will come up. new to python)</p>