Codewars note: Convert boolean values to strings 'Yes' or 'No'
>> False >> 'No'
>>True >> 'Yes'
Solutions:
1
def bool_to_word(boolean): return "Yes" if boolean else "No"
2
def bool_to_word(boolean): return ['No', 'Yes'][boolean]
def bool_to_word(boolean): return ['No', 'Yes'][boolean] bool_to_word(False) >>'No'