Applying Lambda Function In Python