|Mandalika's scratchpad||[ Work blog @Oracle | My Music Compositions ]|
lambdakeyword in Python
lambda argument(s): expression
A trivial example.
def areaofcircle(radius): return math.pi * radius * radius
can be written as:
circlearea = lambda radius : math.pi * radius * radius
In this example, the lambda function accepts a lone argument
radius; and the function evaluates the lambda expression (π * radius2) to calculate the area of a circle and returns the result to caller.
In case of lambda function, the identifier "
circlearea" is assigned the function object the lambda expression creates so
circlearea can be called like any normal function. eg.,
Another trivial example that converts first character in each word in a list to uppercase character.
>> fullname = ["john doe", "richard roe", "janie q"] >>> fullname ['john doe', 'richard roe', 'janie q'] >>> map(lambda name : name.title(), fullname) ['John Doe', 'Richard Roe', 'Janie Q']
This edition is dedicated to Cirque du Soleil, the entertainment group with many successful live shows under their belt. Live original music accompanies almost all of Cirque's carefully choreographed live performances.
Current playlist features music from Cirque du Soleil's various live shows — Saltimbanco (1992), Mystère (1993), Alegría (1994), Dralion (1999), Varekai (2002), Zumanity (2003), Kà (2004), Corteo (2005), Koozå (2007) and Luzia (2016).
Be aware that some of the songs are in imaginary/invented language.
Audio & Widget courtesy: Spotify