:
return not bool ([x x required_values, x some_map.keys()]) ( bool)
return not [x x required_values, x some_map.keys()] ( , )
inside [] ,
, False, - True.
therefore, if the map does not have all the required values, at least one element will be in the list, constructed according to the expression of understanding the list. This will be evaluated as True, therefore we deny the result to fulfill your code requirements (all necessary values must be present on the card).
source
share