Creating a set from a list
examples/sets/create_set_from_list.py
furniture = ['table', 'chair', 'door', 'chair', 'chair'] things = set(furniture) print(things) print(type(things)) if 'table' in things: print("has table")
{'table', 'chair', 'door'} <class 'set'> has table