title: Hanoi Tower Algorithm using recursion, while show the step count
body: <p>We all know the python code to solve Hanoi Tower problem looks like:</p>
  
  <pre><code>def hanoi(n, a, b, c):
      if n == 1:
          print a, '--&gt;', c
          return
      hanoi(n-1, a, c, b)
      print a, '--&gt;', c
      hanoi(n-1, b, a, c)
  
  hanoi(4, 'A', 'B', 'C')
  </code></pre>
  
  <p>My question is where to add <code>print('stepCount ={}'.format(stepCount))</code> to show the stepCount for each step.</p>
  
  <p>****Update &amp; Clarification*****
  while the output of the code above shows:</p>
  
  <pre><code>A &gt; C
  A &gt; B
  C &gt; B
  A &gt; C
  B &gt; A
  B &gt; C
  A &gt; C
  </code></pre>
  
  <p>I am wondering if print statement can be added to the code to change the output to:</p>
  
  <pre><code>stepCount: 1
  A &gt; C
  stepCount: 2
  A &gt; B
  stepCount: 3
  C &gt; B
  stepCount: 4
  A &gt; C
  stepCount: 5
  B &gt; A
  stepCount: 6
  B &gt; C
  stepCount: 7
  A &gt; C
  </code></pre>