# -*- coding: utf-8 -*-
"""
Created on Tue May 09 20:40:15 2017

"""

import random

class BingoCage:
    
    def __init__(self, items):
        self._items = list(items)
        random.shuffle(self._items)
        
    def pick(self):
        try:
            #yield self._items.pop()
            return self._items.pop()
        except IndexError:
            raise LookupError('pick from empty BingoCage')
            
    def __call__(self):
        return self.pick()
    