Python‎ > ‎map‎ > ‎

map.__eq__()

http://www.adilwaseem.com/

Definition
The method tests the whether map() is equal to other value.

Syntax
map(function, iterable).__eq__()

Parameters
function
objective

Examples
The method return with the equality test whether the max() of the map() is equal to pow(23, 3).
x=(11,23,444,333)
y=max(map(lambda a: a, x)).__eq__(pow(22,3))
print(y)
>>> 
False
>>>

if min(map(lambda(decimal,decimal)).__eq__()
The method returns with the minimum value in the sets equation set1/set2*set2 is equal to 4. 
from decimal import*
set1={Decimal(-1355).adjusted(),Decimal(-233.321).copy_negate(), Decimal(-23.99).exp()}
set2={ Decimal(2.0).fma(3,7),Decimal(1.1).log10()}
if min(map(lambda a,b: a/b*b, set1, set2)).__ge__(4):
        print("Return is greater or equal to 4.")
else:
        print("Not within parameters.")

>>> 
Not within parameters.
>>>       

Comments