How to join two sets in one line without using “|” October 14, 2022 by Tarik You can use union method for sets: set.union(other_set) Note that it returns a new set i.e it doesn’t modify itself.