def sum_(f, start, end):
# 1st_value,_,__ = map(f,[start,end]) # how to get 1st value passed on lambda function here ?
# print(1st_value+start+end)
return
if __name__ == '__main__':
print(sum_(lambda y: 1.0, 5, 10))) # 1st_value=1.0,2nd_value=5, 3rd_value=10
How can i get 1.0 value from lambda function inside sum_()? I tried map(), but it did not work.
I have gone to other similar questions too, but did not find my answer, so please don't mark it duplicate.