title: Python - Big-O of del my_list[:]?
body: <p><strong>What is the big O of del my_list[:]?</strong> This command deletes all elements in the list. My understanding is that it will be O(n). n being the length of the list.</p>
  
  <p><strong>Therefore the big O of this code would be bigO(n^2), correct?</strong></p>
  
  <p>Note this is not for school, but rather for my understanding while I practice for interviews.</p>
  
  <pre><code>from copy import deepcopy
  class Solution:
      # @param A : list of integers
      # @return an integer
      def removeDuplicates(self, A):
          copy_array = deepcopy(A)
          del A[:]
  
          for j in copy_array:
              if j in A:
                  pass
              else:
                  A.append(j)
  
          return len(A)
  </code></pre>