Lambda function in Python

#----------------------------- 1- simple lamda function   -------------------------

# syntax : lambda arguments : expression
val = int(input("Enter the number : "))
lam = lambda num : num * 10
print("One parameter \n")
print(lam(val))

val2 =int(input("Enter the 2nd number : "))
val3 =int(input("Enter the 2nd number : "))
lam2 = lambda a, b, c : a - b * (c+a)
print("Three parameters\n")
print(lam2(val, val2, val3))
#----------------------------- 2- function in Lambda  -------------------------

def myf(num):
  return lambda a : a * num

x =int(input("Enter the number to execute : "))
myfunction = myf(x)

print(myfunction(x+3))

Join our team, where career growth knows no limits.

For More Details

Our internship program guarantees personalized attention for optimal career development in the tech industry.

+91 97879 68375

-> You should bring your own laptop during the internship

Who can apply?

Internships are open for students who: B.E / B.Tech / M.E / M.Tech / B.Sc / M.Sc / M.C.A / B.C.A / Diploma.

  • Ongoing Students Only
  • days, 5days/ 10days or Based on Student Preference
  • Limited 1 to 10 students per slot
  • Registration fees : 1000 INR
  • Slots are filling quickly only fewer slots are available