input: Write a function to remove all duplicates from an array of strings and return the resulting array. The function should preserve the order of elements 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']
  assert removeDuplicates(['apple', 'banana', 'apple', 'cherry'])==['apple', 'banana', 'cherry']
  assert removeDuplicates([])==[]
  assert removeDuplicates(['hello'])==['hello']
  assert removeDuplicates(['1', '2', '3', '2', '1'])==['1', '2', '3']
output: 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