Python‎ > ‎map‎ > ‎

map.__sizeof__()


Definition
Return with the size of object in bytes

Syntax
map.__sizeof__()

Parameters
Function and iterable

Examples
map(lambda(function, iterable).__sizeof__()
The function returns with the str(object) in bytes.
a="python centre research"
i=(map(lambda x: x, a)).__sizeof__()
print(i)

>>> 
32
>>> 


if (map(lambda function, string).__sizeof__.__gt__()
The method returns that a string size is greater than 22.
 str="python centre research"
if (map(lambda x: x, str)).__sizeof__().__gt__(22):
    print(str.__str__())
else:
    print("The string bytes size is greater than 22.")

>>> 
python centre research
>>> 


Comments