title: how to make a variable static in python
body: <p>I just started learning programming so when I thought to write code for summation of numbers using recursion in python. I encountered this problem, here how can I make add = 0 as static, Can someone pls help since my ans is coming as 0 </p>
  
  <pre><code>def sum(n):  
      add = 0
      if n &gt; 0: 
          add = add + n
          sumf (n-1)
          print add
  
  sum(10) 
  </code></pre>