title: Shuffle a python list without using the built-in function
body: <p>I'm working on writing two different shuffle functions.</p>
  
  <p>The first shuffle function must take a list and return a new list with the elements shuffled into a random order.</p>
  
  <p>This is what I have so far for the first shuffle function- </p>
  
  <pre><code>def shuf(List):
      import random
      newList=[]
      for i in List:
          i=random.randrange(len(List))
          newList+=i
      return newList
  </code></pre>
  
  <p>The second shuffle function takes a list as a parameter and shuffles the list in place.</p>
  
  <p>I know how to do it with the built-in function but I'm not allowed to use it. </p>