input: Write a function to remove all duplicates from an array of strings and return the resulting array. The function should maintain the order of the elements as they appear in the original array.
  
  def removeDuplicates(arr):
   result = [] 
    
   # traverse for all elements 
   for i in arr: 
    
    # check if exists in result 
    if i not in result: 
     result.append(i) 
    
   # return result 
   return result
  
  assert removeDuplicates(['a', 'b', 'a', 'c', 'c', 'd'])==['a', 'b', 'c', 'd']
output: def removeDuplicates(arr):
   result = [] 
   for i in arr: 
    if i not in result: 
     result.append(i) 
   return result