Lambda Function In Python With For Loop