[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Dihfahsih1/60-python-projects/main/function_programming.py [Back]  [Original]

  
animals = ['dog','zebra','elephant', 'lion',]
def reverse_len(s):
  return -len(s)
y=sorted(animals, key=reverse_len)
 
# lambda function = :

result=(lambda a,b,c: (a+b+c)/4)(10,40,5)
print("lamda function: " + str(result))

std=sorted(animals, key=lambda s: -len(s))
using_sort = animals.sort()

print(using_sort)

Web Proxy Viewer  |  New URL  |  Original Page