From f274404700cf3d38eb59a9929372c0ee4ae51242 Mon Sep 17 00:00:00 2001 From: Deepak Raj <54245038+perfect104@users.noreply.github.com> Date: Tue, 28 Jan 2020 16:57:37 +0530 Subject: [PATCH] Update Count Numbers in list for histogram. py.py --- ...Count Numbers in list for histogram. py.py | 72 +------------------ 1 file changed, 2 insertions(+), 70 deletions(-) diff --git a/Python Intermediate/Count Numbers in list for histogram. py.py b/Python Intermediate/Count Numbers in list for histogram. py.py index 8eecd0c..24e22fe 100644 --- a/Python Intermediate/Count Numbers in list for histogram. py.py +++ b/Python Intermediate/Count Numbers in list for histogram. py.py @@ -3,76 +3,8 @@ it to create Histogram ''' from collections import Counter -document = (10, -1, -10, -5, -7, -4, -1, -1, -10, -10, -9, -10, -1, -3, -9, -9, -4, -1, -8, -6, -7, -3, -6, -7, -3, -10, -5, -3, -10, -4, -6, -8, -10, -5, -5, -9, -10, -8, -10, -9, -10, -10, -8, -7, -7, -10, -8, -6, -4, -6, -1, -9, -10, -2, -3, -3, -9, -2, -3, -8, -1, -7, -3, -10, -6, -6, -9, -6, -7, -9) +document = (10,1,10,5,7,4,1,1,10,10,9,10,1,3,9,9,4,8,6,7,3,6,7,3,10,5,3,10,4,6,8,10,5,5,10,10,9,10,10,8,7,7,10,8, +6,4,6,1,9,10,2,3,9,2,3,8,1,7,3,10,6,6,9,6,7,9) word_counts = Counter(document) for word, count in word_counts.most_common(10): print('The Number %d Comes %d times ' %(word,count)) \ No newline at end of file