def append_if(array, item):
 if (item not in array):
  array.append(item)
  return True
 return False

def append_if ( array , item ) : if ( item not in array ) : array . append ( item ) return True return False
append an item to an array if its not already in it .