From 22b4be550110d18c14b452972fe0352d25092405 Mon Sep 17 00:00:00 2001 From: Rohit Tanwar Date: Thu, 8 Feb 2018 19:30:14 +0530 Subject: [PATCH] difference_by --- snippets/difference_by.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/snippets/difference_by.md b/snippets/difference_by.md index c9d82dbf2..727c303aa 100644 --- a/snippets/difference_by.md +++ b/snippets/difference_by.md @@ -6,6 +6,7 @@ def difference_by(a, b, fn): ``` ```python -difference_by([2.1, 1.2], [2.3, 3.4],floor); // [1.2] -difference_by([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], lambda v : v['x']); // [ { x: 2 } ] +from math import floor +difference_by([2.1, 1.2], [2.3, 3.4],floor) # [1.2] +difference_by([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], lambda v : v['x']) # [ { x: 2 } ] ``` \ No newline at end of file