Python 3.10.1,
class ItemRow:
def __Init__(self, name, addresses, phone_numbers):
self.friendName = name
self.addrs = set(addresses)
self.phone_nos = set(phone_numbers)
friendObject = ItemRow("Peppermint Patty", "2301 Hardies Ln", "")
print(friendObject.addrs)
The output is
{‘e’, ‘H’, ‘3’, ‘n’, ‘1’, etc., etc.}. I.e., each character is added to the set instead of the entire string being a member of the set.
I can add to the set fine, i.e., if I add “2301 Hardies Ln” after instantiating the object, the addrs set is all of the original caracters, plus an element equal to the complete string.