Set is a built-in data type present in both Python and Java but both of these languages handles the elements in a set differently.

Though the underlying implementation of set is the same in both languages, Java lets you add mutable objects, such as a list to a set, whereas Python does not.

#java #hash #python

Mutables in a Set: Python vs Java
1.80 GEEK