14/15: Index out of range?


#1

def remove_duplicates(array):
    removed = []
   
   
    
    sorted_array = sorted(array)
    
    removed.append(sorted_array[0])
    
    count = 0 
   

    
    for i in range(len(array)):
      
        print sorted_array[i] 
        
        if sorted_array[i] != removed[count]:
            removed.append(sorted_array[i]) 
            count +=1
           
          
    
    
    print "**************" 
    print removed
    print "**************" 
    return removed
    
    
    
    
remove_duplicates([1,2,2,98,98,100,101,110])

My code works (seemingly), but I cant advance as the prompt is indicating my index is out of range. If I change
for i in range(len(array)) to range(len(array)-1) the index error disappears but it will always ignore the largest number.