from bag import * items = ['hello', 'world', 123, True, 'How are you?', 234, 567] my_bag = Bag() #=============================== # The followings test bag with operatory overload #print('Count of items in the bag : ', len(my_bag)) print('Test + ...') for x in items: my_bag = my_bag + x print('Added .. ', x) print('Count of items in the bag : ', len(my_bag)) print('Test contains using the "in" operator ...') print( 'Test my_bag.contains("hello") True : ', 'hello' in my_bag) print( 'Test my_bag.contains(True) True : ', True in my_bag) print( 'Test my_bag.contains(False) False : ', False in my_bag) print( 'Test my_bag.contains(567) True : ', 567 in my_bag) print( 'Test my_bag.contains(5678) False : ', 5678 in my_bag) for x in items: my_bag.remove(x) print('Removing ...', x) print('Count of items in the bag : ', len(my_bag))