Remove redundancy in set creation

There is no need to iterate over a string when creating a set, as the string is already an iterable in Python.