From 14bebd7c4600634352dbf9b5aee61bc0b83abfe2 Mon Sep 17 00:00:00 2001 From: Crista Lopes Date: Fri, 8 Nov 2013 16:00:09 -0800 Subject: [PATCH] Minor aesthetic details in go forth --- 02-go-forth/tf-02.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/02-go-forth/tf-02.py b/02-go-forth/tf-02.py index 17b8e93..1e50c35 100755 --- a/02-go-forth/tf-02.py +++ b/02-go-forth/tf-02.py @@ -1,5 +1,4 @@ #!/usr/bin/env python - import sys, re, operator, string # @@ -64,9 +63,8 @@ def remove_stop_words(): else: heap['words'].append(stack.pop()) # pop it, store it stack.extend(heap['words']) # Load the words onto the stack - del heap['stop_words'] # We don't need this variable anymore - del heap['words'] # We don't need this variable anymore - + del heap['stop_words']; del heap['words'] # Not needed + def frequencies(): """ Takes a list of words and returns a dictionary associating