Function printing correct Output and None

后端 未结 3 716
借酒劲吻你
借酒劲吻你 2021-01-20 22:33

I have defined this function that takes a word and a string of required letters and that returns True if the word uses all the required letters at least once. When I run thi

3条回答
  •  Happy的楠姐
    2021-01-20 23:27

    You print the result of the function, but the function doesn't return anything (--> None)

    If you want the result to be False False, add return boolean in the function.

    Alternatively, if a single False is enough, you could change print uses_all('facebook', 'd') to just uses_all('facebook', 'd')

提交回复
热议问题