3 ms·
Sets are more useful when you want to dedupe unknown data. Defining a set with constants to use immediately in a for loop is not very helpful compared to a tupl
by yunohn 4y ago
Sets are more useful when you want to dedupe unknown data. Defining a set with constants to use immediately in a for loop is not very helpful compared to a tuple or a list.
Also, you can make anything iterable in python if you implement __iter__.