> I'm trying to compress a string. > E.g: > > "AAAABBBC" -> "ABC"
Doesn't preserve order, but insures uniqueness: line = "AAAABBBC" print ''.join( set( line ) ) Malcolm -- http://mail.python.org/mailman/listinfo/python-list
> I'm trying to compress a string. > E.g: > > "AAAABBBC" -> "ABC"
Doesn't preserve order, but insures uniqueness: line = "AAAABBBC" print ''.join( set( line ) ) Malcolm -- http://mail.python.org/mailman/listinfo/python-list