title: Using a While Loop to Iterate a List and Stop at a given value
body: <h2>Question</h2>
  <p>Write a function called stop_at_four that iterates through a list of numbers. Using a while loop, append each number to a new list until the number 4 appears. The function should return the new list.</p>
  <h2>My answer</h2>
  <pre><code>def stop_at_four():  
      list_=[3,6,4,1,3]
      accum_lst=[]
      accum_var=0
      
      while list_[accum_var] !=4:
          accum_lst.append(list_[accum_var])
      accum_var+=1
      return
  </code></pre>
  <p>P.S. any criticism on how to improve my code efficiency would be greatly appreciated.</p>