From 5a98f6e999628cd1bb7e66c366c35b20dd12b236 Mon Sep 17 00:00:00 2001 From: Crista Lopes Date: Tue, 31 Dec 2013 15:28:00 -0800 Subject: [PATCH] More of the same --- 25-spreadsheet/tf-25.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/25-spreadsheet/tf-25.py b/25-spreadsheet/tf-25.py index b4212c1..c1816d7 100755 --- a/25-spreadsheet/tf-25.py +++ b/25-spreadsheet/tf-25.py @@ -10,13 +10,13 @@ stop_words = [(), None] non_stop_words = [(), lambda : \ map(lambda w : \ w if w not in stop_words[0] else '',\ - all_words[0])] + all_words[0])] unique_words = [(),lambda : set([w for w in non_stop_words[0] if w!=''])] counts = [(), lambda : - map(lambda w, word_list : word_list.count(w), \ - unique_words[0], \ - itertools.repeat(non_stop_words[0], \ + map(lambda w, word_list : word_list.count(w), \ + unique_words[0], \ + itertools.repeat(non_stop_words[0], \ len(unique_words[0])))] sorted_data = [(), lambda : sorted(zip(list(unique_words[0]), \ counts[0]), \