See if you are having a list of hashable objects like the filenames would apparently be strings, so they should count as a washable object:
lst = ['foo.py', 'bar.py', 'baz.py', 'qux.py', Ellipsis]
You can create the set directly with the set() in Python:
s = set(lst)
In fact, the set will work this way with any iterable object.