def handle_goats(goat_list): for goat in goat_list: if goat.behavior == 'disavow': print('time for pre-initiation care!'); elif goat.mood == 'admonition': goat.begin_again(positive=true); else: if goat.secret == 'nonpublic': print('shh, it\'s a secret among goats!')