title: Write a recursive function called rev, which reverses the order of elements in an array
body: <p>Im new in this coding platform.</p>
  
  <p>So i have a work to do which is reversing the order of elementsin an array recursively.</p>
  
  <p>So here is what i did:</p>
  
  <pre><code>A= [4,2,7,3,9,1]
  
  def rev(A):
      if (len(A)==1):
          return A[0]
      else:
          return A[-1],pri(A[:-1])
  print (rev(A))
  </code></pre>
  
  <blockquote>
    <p>Output:</p>
    
    <p>(1, (4, (2, (7, (3, 9)))))</p>
  </blockquote>
  
  <p>so i dont understand what i did wrongly,and if you can do it i want to do the output with ; instead of () things.
  I have to do the program in python 3.0 or later versions.</p>
  
  <p>Thank you.</p>