def ordered_set(iterable):
 mmap = {}
 ord_set = []
 for item in iterable:
  if (item not in mmap):
   mmap[item] = 1
   ord_set.append(item)
 return ord_set

def ordered_set ( iterable ) : mmap = { } ord_set = [ ] for item in iterable : if ( item not in mmap ) : mmap [ item ] = 1 ord_set . append ( item ) return ord_set
creates an ordered list from strings .