$ ls -l oliver_twist.txt -rw-r--r--@ 1 sandiway staff 936445 Sep 29 2021 oliver_twist.txt $ python Python 3.9.16 | packaged by conda-forge | (main, Feb 1 2023, 21:38:11) [Clang 14.0.6 ] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> raw = open('oliver_twist.txt').read() >>> len(raw) 893534 >>> import nltk >>> words = nltk.word_tokenize(raw) >>> len(words) 199836 >>> len1 = [len(word) for word in words[0:1000]] >>> len(len1) 1000 >>> len1 [5, 1, 6, 5, 6, 1, 7, 7, 8, 1, 7, 9, 3, 8, 1, 5, 1, 1, 1, 5, 2, 4, 7, 9, 5, 6, 5, 1, 1, 1, 6, 5, 2, 3, 6, 3, 1, 1, 8, 2, 7, 7, 8, 1, 6, 2, 3, 5, 5, 6, 5, 3, 4, 3, 2, 3, 13, 9, 3, 5, 2, 6, 2, 6, 5, 1, 1, 6, 1, 9, 1, 3, 5, 3, 7, 3, 6, 5, 3, 4, 4, 7, 1, 5, 5, 5, 3, 4, 4, 1, 8, 2, 6, 1, 5, 7, 7, 5, 1, 5, 3, 5, 5, 4, 6, 4, 1, 6, 7, 4, 3, 10, 1, 5, 2, 1, 7, 3, 3, 5, 4, 1, 2, 5, 2, 12, 6, 2, 3, 6, 1, 1, 8, 2, 6, 1, 5, 6, 2, 3, 6, 2, 4, 1, 6, 4, 6, 1, 3, 6, 10, 3, 3, 6, 9, 10, 4, 6, 5, 2, 6, 1, 2, 10, 2, 3, 4, 1, 7, 4, 2, 5, 9, 2, 10, 7, 11, 10, 3, 8, 3, 9, 1, 3, 3, 7, 6, 1, 6, 7, 6, 10, 4, 3, 10, 2, 3, 3, 10, 1, 3, 9, 10, 2, 1, 4, 5, 1, 5, 1, 5, 1, 3, 4, 9, 7, 1, 2, 4, 7, 2, 6, 2, 3, 4, 3, 6, 10, 1, 3, 9, 1, 6, 8, 2, 3, 4, 2, 13, 7, 3, 2, 5, 6, 2, 5, 6, 4, 2, 4, 2, 4, 3, 6, 1, 3, 2, 5, 3, 9, 7, 2, 3, 5, 3, 9, 3, 3, 8, 7, 1, 4, 4, 3, 13, 3, 10, 2, 3, 11, 6, 1, 9, 4, 4, 7, 8, 7, 3, 7, 1, 12, 2, 4, 7, 3, 10, 7, 11, 2, 6, 1, 1, 4, 2, 3, 8, 1, 1, 1, 4, 3, 10, 10, 5, 3, 3, 7, 7, 10, 3, 1, 4, 2, 4, 3, 2, 2, 6, 2, 7, 3, 4, 4, 2, 6, 5, 1, 3, 5, 3, 3, 3, 4, 5, 4, 3, 7, 4, 6, 2, 6, 5, 1, 5, 2, 3, 4, 7, 2, 5, 4, 6, 1, 1, 7, 10, 12, 1, 6, 1, 5, 3, 2, 6, 2, 6, 3, 10, 5, 3, 6, 6, 3, 4, 2, 3, 9, 7, 2, 3, 9, 7, 3, 2, 5, 1, 7, 4, 2, 9, 3, 10, 2, 2, 7, 6, 2, 9, 4, 2, 3, 7, 5, 3, 3, 10, 4, 3, 8, 5, 5, 8, 3, 9, 2, 1, 8, 12, 7, 3, 6, 3, 1, 4, 1, 3, 5, 4, 4, 1, 6, 3, 2, 11, 2, 4, 6, 4, 6, 2, 1, 4, 4, 7, 1, 3, 2, 1, 5, 3, 1, 3, 3, 2, 5, 2, 10, 2, 4, 7, 3, 7, 4, 7, 7, 2, 3, 5, 3, 7, 4, 2, 5, 1, 10, 9, 7, 4, 3, 5, 1, 3, 4, 6, 1, 11, 4, 4, 7, 1, 3, 4, 3, 9, 5, 6, 3, 3, 12, 2, 1, 6, 7, 1, 5, 8, 1, 4, 1, 4, 15, 6, 5, 5, 6, 1, 3, 8, 4, 3, 10, 4, 3, 2, 12, 7, 2, 3, 7, 2, 3, 5, 1, 2, 5, 6, 8, 3, 7, 4, 6, 1, 1, 3, 8, 7, 2, 3, 4, 8, 1, 8, 8, 5, 2, 3, 5, 4, 6, 5, 2, 4, 4, 3, 4, 7, 6, 7, 3, 9, 2, 6, 3, 3, 7, 1, 11, 1, 6, 5, 5, 8, 4, 12, 11, 8, 2, 1, 5, 9, 3, 3, 7, 4, 3, 5, 1, 3, 1, 3, 9, 5, 8, 2, 6, 4, 10, 3, 14, 6, 2, 6, 1, 1, 9, 1, 3, 1, 12, 2, 4, 10, 7, 5, 6, 3, 4, 5, 2, 1, 4, 5, 3, 1, 3, 3, 6, 2, 2, 5, 10, 2, 3, 5, 1, 3, 2, 6, 2, 4, 15, 1, 2, 1, 6, 2, 3, 4, 1, 3, 1, 3, 2, 3, 4, 4, 6, 4, 3, 4, 7, 6, 2, 5, 3, 6, 3, 8, 1, 8, 1, 3, 8, 2, 11, 5, 7, 10, 2, 7, 2, 4, 6, 7, 3, 3, 4, 6, 1, 3, 3, 5, 1, 2, 5, 9, 9, 5, 10, 4, 11, 10, 4, 4, 3, 6, 2, 7, 10, 1, 3, 5, 3, 5, 3, 3, 3, 4, 5, 6, 5, 8, 2, 1, 7, 9, 1, 5, 2, 1, 6, 2, 3, 4, 7, 3, 10, 5, 11, 1, 3, 7, 4, 8, 1, 4, 11, 1, 6, 4, 5, 4, 2, 3, 12, 2, 6, 1, 1, 1, 10, 7, 5, 2, 6, 1, 7, 1, 6, 9, 2, 3, 10, 5, 7, 2, 5, 3, 3, 6, 6, 3, 4, 7, 4, 3, 4, 7, 3, 5, 2, 6, 3, 6, 2, 4, 6, 1, 3, 5, 1, 3, 4, 8, 2, 8, 2, 5, 2, 1, 6, 7, 4, 3, 11, 4, 5, 5, 12, 6, 3, 6, 2, 5, 4, 5, 3, 3, 8, 2, 6, 4, 1, 5, 12, 1, 3, 3, 12, 4, 10, 2, 1, 3, 7, 3, 6, 2, 9, 2, 11, 2, 4, 9, 4, 3, 1, 3, 13, 1, 8, 2, 8, 4, 2, 4, 2, 10, 2, 9, 3, 5, 1, 1, 4, 5, 5, 4, 3, 4, 7, 1, 1, 6, 2, 3, 5, 5, 6, 5, 3, 4, 3, 2, 3, 13, 9, 3, 5, 5, 5, 6, 9, 2, 1, 7, 4, 1, 5, 3, 4, 7, 2, 4, 2, 7, 2, 7, 4, 10, 1, 3, 2, 5, 1, 4, 6, 2, 10, 4, 1, 5, 2, 3, 9, 6, 2, 4, 5, 1, 5, 2, 5, 1, 2, 3, 1, 1, 9, 1, 3, 2, 4, 9, 3, 4, 1, 2, 1, 3, 3, 4, 5, 1, 4, 3, 7, 6, 2, 6, 1, 8, 2, 2, 3, 2, 2, 2, 8] >>> len1 >>> len2 = [len(word) for word in words[1000:2000]] >>> len3 = [len(word) for word in words[2000:3000]] >>> import matplotlib.pyplot as plt >>> max(len1) 15 >>> max(len2) 12 >>> max(len3) 20 >>> plt.hist(len1, range(1,mx+1), histtype='step', label='1st 1000') Traceback (most recent call last): File "", line 1, in NameError: name 'mx' is not defined >>> plt.hist(len1, range(1,21), histtype='step', label='1st 1000') (array([138., 136., 176., 121., 112., 98., 77., 36., 36., 37., 13., 12., 5., 1., 2., 0., 0., 0., 0.]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.hist(len2, range(1,21), histtype='step', label='2nd 1000') (array([191., 136., 197., 152., 102., 77., 50., 37., 27., 10., 13., 8., 0., 0., 0., 0., 0., 0., 0.]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.hist(len3, range(1,21), histtype='step', label='3rd 1000') (array([148., 137., 201., 124., 101., 91., 55., 44., 32., 18., 16., 11., 10., 5., 3., 1., 0., 0., 3.]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.xticks(range(1,21)) ([, , , , , , , , , , , , , , , , , , , ], [Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, '')]) >>> plt.legend() >>> plt.show() >>> plt.show() >>> >>> plt.hist(len1, range(1,21), histtype='step', label='1st 1000') (array([138., 136., 176., 121., 112., 98., 77., 36., 36., 37., 13., 12., 5., 1., 2., 0., 0., 0., 0.]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.hist(len2, range(1,21), histtype='step', label='2nd 1000') (array([191., 136., 197., 152., 102., 77., 50., 37., 27., 10., 13., 8., 0., 0., 0., 0., 0., 0., 0.]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.xticks(range(1,21)) ([, , , , , , , , , , , , , , , , , , , ], [Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, '')]) >>> plt.legend() >>> plt.show() >>> >>> words2 = [word for word in words if any(c.isalpha() for c in word)] >>> len(words2) 160639 >>> words[:100] ['Title', ':', 'Oliver', 'Twist', 'Author', ':', 'Charles', 'Dickens', 'Language', ':', 'English', 'Character', 'set', 'encoding', ':', 'UTF-8', '*', '*', '*', 'START', 'OF', 'THIS', 'PROJECT', 'GUTENBERG', 'EBOOK', 'OLIVER', 'TWIST', '*', '*', '*', 'Oliver', 'Twist', 'OR', 'THE', 'PARISH', 'BOY', '’', 'S', 'PROGRESS', 'by', 'Charles', 'Dickens', 'Contents', 'I', 'TREATS', 'OF', 'THE', 'PLACE', 'WHERE', 'OLIVER', 'TWIST', 'WAS', 'BORN', 'AND', 'OF', 'THE', 'CIRCUMSTANCES', 'ATTENDING', 'HIS', 'BIRTH', 'II', 'TREATS', 'OF', 'OLIVER', 'TWIST', '’', 'S', 'GROWTH', ',', 'EDUCATION', ',', 'AND', 'BOARD', 'III', 'RELATES', 'HOW', 'OLIVER', 'TWIST', 'WAS', 'VERY', 'NEAR', 'GETTING', 'A', 'PLACE', 'WHICH', 'WOULD', 'NOT', 'HAVE', 'BEEN', 'A', 'SINECURE', 'IV', 'OLIVER', ',', 'BEING', 'OFFERED', 'ANOTHER', 'PLACE', ',', 'MAKES'] >>> words[:1000] ['Title', ':', 'Oliver', 'Twist', 'Author', ':', 'Charles', 'Dickens', 'Language', ':', 'English', 'Character', 'set', 'encoding', ':', 'UTF-8', '*', '*', '*', 'START', 'OF', 'THIS', 'PROJECT', 'GUTENBERG', 'EBOOK', 'OLIVER', 'TWIST', '*', '*', '*', 'Oliver', 'Twist', 'OR', 'THE', 'PARISH', 'BOY', '’', 'S', 'PROGRESS', 'by', 'Charles', 'Dickens', 'Contents', 'I', 'TREATS', 'OF', 'THE', 'PLACE', 'WHERE', 'OLIVER', 'TWIST', 'WAS', 'BORN', 'AND', 'OF', 'THE', 'CIRCUMSTANCES', 'ATTENDING', 'HIS', 'BIRTH', 'II', 'TREATS', 'OF', 'OLIVER', 'TWIST', '’', 'S', 'GROWTH', ',', 'EDUCATION', ',', 'AND', 'BOARD', 'III', 'RELATES', 'HOW', 'OLIVER', 'TWIST', 'WAS', 'VERY', 'NEAR', 'GETTING', 'A', 'PLACE', 'WHICH', 'WOULD', 'NOT', 'HAVE', 'BEEN', 'A', 'SINECURE', 'IV', 'OLIVER', ',', 'BEING', 'OFFERED', 'ANOTHER', 'PLACE', ',', 'MAKES', 'HIS', 'FIRST', 'ENTRY', 'INTO', 'PUBLIC', 'LIFE', 'V', 'OLIVER', 'MINGLES', 'WITH', 'NEW', 'ASSOCIATES', '.', 'GOING', 'TO', 'A', 'FUNERAL', 'FOR', 'THE', 'FIRST', 'TIME', ',', 'HE', 'FORMS', 'AN', 'UNFAVOURABLE', 'NOTION', 'OF', 'HIS', 'MASTER', '’', 'S', 'BUSINESS', 'VI', 'OLIVER', ',', 'BEING', 'GOADED', 'BY', 'THE', 'TAUNTS', 'OF', 'NOAH', ',', 'ROUSES', 'INTO', 'ACTION', ',', 'AND', 'RATHER', 'ASTONISHES', 'HIM', 'VII', 'OLIVER', 'CONTINUES', 'REFRACTORY', 'VIII', 'OLIVER', 'WALKS', 'TO', 'LONDON', '.', 'HE', 'ENCOUNTERS', 'ON', 'THE', 'ROAD', 'A', 'STRANGE', 'SORT', 'OF', 'YOUNG', 'GENTLEMAN', 'IX', 'CONTAINING', 'FURTHER', 'PARTICULARS', 'CONCERNING', 'THE', 'PLEASANT', 'OLD', 'GENTLEMAN', ',', 'AND', 'HIS', 'HOPEFUL', 'PUPILS', 'X', 'OLIVER', 'BECOMES', 'BETTER', 'ACQUAINTED', 'WITH', 'THE', 'CHARACTERS', 'OF', 'HIS', 'NEW', 'ASSOCIATES', ';', 'AND', 'PURCHASES', 'EXPERIENCE', 'AT', 'A', 'HIGH', 'PRICE', '.', 'BEING', 'A', 'SHORT', ',', 'BUT', 'VERY', 'IMPORTANT', 'CHAPTER', ',', 'IN', 'THIS', 'HISTORY', 'XI', 'TREATS', 'OF', 'MR.', 'FANG', 'THE', 'POLICE', 'MAGISTRATE', ';', 'AND', 'FURNISHES', 'A', 'SLIGHT', 'SPECIMEN', 'OF', 'HIS', 'MODE', 'OF', 'ADMINISTERING', 'JUSTICE', 'XII', 'IN', 'WHICH', 'OLIVER', 'IS', 'TAKEN', 'BETTER', 'CARE', 'OF', 'THAN', 'HE', 'EVER', 'WAS', 'BEFORE', '.', 'AND', 'IN', 'WHICH', 'THE', 'NARRATIVE', 'REVERTS', 'TO', 'THE', 'MERRY', 'OLD', 'GENTLEMAN', 'AND', 'HIS', 'YOUTHFUL', 'FRIENDS', '.', 'XIII', 'SOME', 'NEW', 'ACQUAINTANCES', 'ARE', 'INTRODUCED', 'TO', 'THE', 'INTELLIGENT', 'READER', ',', 'CONNECTED', 'WITH', 'WHOM', 'VARIOUS', 'PLEASANT', 'MATTERS', 'ARE', 'RELATED', ',', 'APPERTAINING', 'TO', 'THIS', 'HISTORY', 'XIV', 'COMPRISING', 'FURTHER', 'PARTICULARS', 'OF', 'OLIVER', '’', 'S', 'STAY', 'AT', 'MR.', 'BROWNLOW', '’', 'S', ',', 'WITH', 'THE', 'REMARKABLE', 'PREDICTION', 'WHICH', 'ONE', 'MR.', 'GRIMWIG', 'UTTERED', 'CONCERNING', 'HIM', ',', 'WHEN', 'HE', 'WENT', 'OUT', 'ON', 'AN', 'ERRAND', 'XV', 'SHOWING', 'HOW', 'VERY', 'FOND', 'OF', 'OLIVER', 'TWIST', ',', 'THE', 'MERRY', 'OLD', 'JEW', 'AND', 'MISS', 'NANCY', 'WERE', 'XVI', 'RELATES', 'WHAT', 'BECAME', 'OF', 'OLIVER', 'TWIST', ',', 'AFTER', 'HE', 'HAD', 'BEEN', 'CLAIMED', 'BY', 'NANCY', 'XVII', 'OLIVER', '’', 'S', 'DESTINY', 'CONTINUING', 'UNPROPITIOUS', ',', 'BRINGS', 'A', 'GREAT', 'MAN', 'TO', 'LONDON', 'TO', 'INJURE', 'HIS', 'REPUTATION', 'XVIII', 'HOW', 'OLIVER', 'PASSED', 'HIS', 'TIME', 'IN', 'THE', 'IMPROVING', 'SOCIETY', 'OF', 'HIS', 'REPUTABLE', 'FRIENDS', 'XIX', 'IN', 'WHICH', 'A', 'NOTABLE', 'PLAN', 'IS', 'DISCUSSED', 'AND', 'DETERMINED', 'ON', 'XX', 'WHEREIN', 'OLIVER', 'IS', 'DELIVERED', 'OVER', 'TO', 'MR.', 'WILLIAM', 'SIKES', 'XXI', 'THE', 'EXPEDITION', 'XXII', 'THE', 'BURGLARY', 'XXIII', 'WHICH', 'CONTAINS', 'THE', 'SUBSTANCE', 'OF', 'A', 'PLEASANT', 'CONVERSATION', 'BETWEEN', 'MR.', 'BUMBLE', 'AND', 'A', 'LADY', ';', 'AND', 'SHOWS', 'THAT', 'EVEN', 'A', 'BEADLE', 'MAY', 'BE', 'SUSCEPTIBLE', 'ON', 'SOME', 'POINTS', 'XXIV', 'TREATS', 'ON', 'A', 'VERY', 'POOR', 'SUBJECT', '.', 'BUT', 'IS', 'A', 'SHORT', 'ONE', ',', 'AND', 'MAY', 'BE', 'FOUND', 'OF', 'IMPORTANCE', 'IN', 'THIS', 'HISTORY', 'XXV', 'WHEREIN', 'THIS', 'HISTORY', 'REVERTS', 'TO', 'MR.', 'FAGIN', 'AND', 'COMPANY', 'XXVI', 'IN', 'WHICH', 'A', 'MYSTERIOUS', 'CHARACTER', 'APPEARS', 'UPON', 'THE', 'SCENE', ';', 'AND', 'MANY', 'THINGS', ',', 'INSEPARABLE', 'FROM', 'THIS', 'HISTORY', ',', 'ARE', 'DONE', 'AND', 'PERFORMED', 'XXVII', 'ATONES', 'FOR', 'THE', 'UNPOLITENESS', 'OF', 'A', 'FORMER', 'CHAPTER', ';', 'WHICH', 'DESERTED', 'A', 'LADY', ',', 'MOST', 'UNCEREMONIOUSLY', 'XXVIII', 'LOOKS', 'AFTER', 'OLIVER', ',', 'AND', 'PROCEEDS', 'WITH', 'HIS', 'ADVENTURES', 'XXIX', 'HAS', 'AN', 'INTRODUCTORY', 'ACCOUNT', 'OF', 'THE', 'INMATES', 'OF', 'THE', 'HOUSE', ',', 'TO', 'WHICH', 'OLIVER', 'RESORTED', 'XXX', 'RELATES', 'WHAT', 'OLIVER', '’', 'S', 'NEW', 'VISITORS', 'THOUGHT', 'OF', 'HIM', 'XXXI', 'INVOLVES', 'A', 'CRITICAL', 'POSITION', 'XXXII', 'OF', 'THE', 'HAPPY', 'LIFE', 'OLIVER', 'BEGAN', 'TO', 'LEAD', 'WITH', 'HIS', 'KIND', 'FRIENDS', 'XXXIII', 'WHEREIN', 'THE', 'HAPPINESS', 'OF', 'OLIVER', 'AND', 'HIS', 'FRIENDS', ',', 'EXPERIENCES', 'A', 'SUDDEN', 'CHECK', 'XXXIV', 'CONTAINS', 'SOME', 'INTRODUCTORY', 'PARTICULARS', 'RELATIVE', 'TO', 'A', 'YOUNG', 'GENTLEMAN', 'WHO', 'NOW', 'ARRIVES', 'UPON', 'THE', 'SCENE', ';', 'AND', 'A', 'NEW', 'ADVENTURE', 'WHICH', 'HAPPENED', 'TO', 'OLIVER', 'XXXV', 'CONTAINING', 'THE', 'UNSATISFACTORY', 'RESULT', 'OF', 'OLIVER', '’', 'S', 'ADVENTURE', ';', 'AND', 'A', 'CONVERSATION', 'OF', 'SOME', 'IMPORTANCE', 'BETWEEN', 'HARRY', 'MAYLIE', 'AND', 'ROSE', 'XXXVI', 'IS', 'A', 'VERY', 'SHORT', 'ONE', ',', 'AND', 'MAY', 'APPEAR', 'OF', 'NO', 'GREAT', 'IMPORTANCE', 'IN', 'ITS', 'PLACE', ',', 'BUT', 'IT', 'SHOULD', 'BE', 'READ', 'NOTWITHSTANDING', ',', 'AS', 'A', 'SEQUEL', 'TO', 'THE', 'LAST', ',', 'AND', 'A', 'KEY', 'TO', 'ONE', 'THAT', 'WILL', 'FOLLOW', 'WHEN', 'ITS', 'TIME', 'ARRIVES', 'XXXVII', 'IN', 'WHICH', 'THE', 'READER', 'MAY', 'PERCEIVE', 'A', 'CONTRAST', ',', 'NOT', 'UNCOMMON', 'IN', 'MATRIMONIAL', 'CASES', 'XXXVIII', 'CONTAINING', 'AN', 'ACCOUNT', 'OF', 'WHAT', 'PASSED', 'BETWEEN', 'MR.', 'AND', 'MRS.', 'BUMBLE', ',', 'AND', 'MR.', 'MONKS', ',', 'AT', 'THEIR', 'NOCTURNAL', 'INTERVIEW', 'XXXIX', 'INTRODUCES', 'SOME', 'RESPECTABLE', 'CHARACTERS', 'WITH', 'WHOM', 'THE', 'READER', 'IS', 'ALREADY', 'ACQUAINTED', ',', 'AND', 'SHOWS', 'HOW', 'MONKS', 'AND', 'THE', 'JEW', 'LAID', 'THEIR', 'WORTHY', 'HEADS', 'TOGETHER', 'XL', 'A', 'STRANGE', 'INTERVIEW', ',', 'WHICH', 'IS', 'A', 'SEQUEL', 'TO', 'THE', 'LAST', 'CHAMBER', 'XLI', 'CONTAINING', 'FRESH', 'DISCOVERIES', ',', 'AND', 'SHOWING', 'THAT', 'SUPRISES', ',', 'LIKE', 'MISFORTUNES', ',', 'SELDOM', 'COME', 'ALONE', 'XLII', 'AN', 'OLD', 'ACQUAINTANCE', 'OF', 'OLIVER', '’', 'S', ',', 'EXHIBITING', 'DECIDED', 'MARKS', 'OF', 'GENIUS', ',', 'BECOMES', 'A', 'PUBLIC', 'CHARACTER', 'IN', 'THE', 'METROPOLIS', 'XLIII', 'WHEREIN', 'IS', 'SHOWN', 'HOW', 'THE', 'ARTFUL', 'DODGER', 'GOT', 'INTO', 'TROUBLE', 'XLIV', 'THE', 'TIME', 'ARRIVES', 'FOR', 'NANCY', 'TO', 'REDEEM', 'HER', 'PLEDGE', 'TO', 'ROSE', 'MAYLIE', '.', 'SHE', 'FAILS', '.', 'XLV', 'NOAH', 'CLAYPOLE', 'IS', 'EMPLOYED', 'BY', 'FAGIN', 'ON', 'A', 'SECRET', 'MISSION', 'XLVI', 'THE', 'APPOINTMENT', 'KEPT', 'XLVII', 'FATAL', 'CONSEQUENCES', 'XLVIII', 'THE', 'FLIGHT', 'OF', 'SIKES', 'XLIX', 'MONKS', 'AND', 'MR.', 'BROWNLOW', 'AT', 'LENGTH', 'MEET', '.', 'THEIR', 'CONVERSATION', ',', 'AND', 'THE', 'INTELLIGENCE', 'THAT', 'INTERRUPTS', 'IT', 'L', 'THE', 'PURSUIT', 'AND', 'ESCAPE', 'LI', 'AFFORDING', 'AN', 'EXPLANATION', 'OF', 'MORE', 'MYSTERIES', 'THAN', 'ONE', ',', 'AND', 'COMPREHENDING', 'A', 'PROPOSAL', 'OF', 'MARRIAGE', 'WITH', 'NO', 'WORD', 'OF', 'SETTLEMENT', 'OR', 'PIN-MONEY', 'LII', 'FAGIN', '’', 'S', 'LAST', 'NIGHT', 'ALIVE', 'LIII', 'AND', 'LAST', 'CHAPTER', 'I', '.', 'TREATS', 'OF', 'THE', 'PLACE', 'WHERE', 'OLIVER', 'TWIST', 'WAS', 'BORN', 'AND', 'OF', 'THE', 'CIRCUMSTANCES', 'ATTENDING', 'HIS', 'BIRTH', 'Among', 'other', 'public', 'buildings', 'in', 'a', 'certain', 'town', ',', 'which', 'for', 'many', 'reasons', 'it', 'will', 'be', 'prudent', 'to', 'refrain', 'from', 'mentioning', ',', 'and', 'to', 'which', 'I', 'will', 'assign', 'no', 'fictitious', 'name', ',', 'there', 'is', 'one', 'anciently', 'common', 'to', 'most', 'towns', ',', 'great', 'or', 'small', ':', 'to', 'wit', ',', 'a', 'workhouse', ';', 'and', 'in', 'this', 'workhouse', 'was', 'born', ';', 'on', 'a', 'day', 'and', 'date', 'which', 'I', 'need', 'not', 'trouble', 'myself', 'to', 'repeat', ',', 'inasmuch', 'as', 'it', 'can', 'be', 'of', 'no', 'possible'] >>> >>> any(c.isalpha() for c in 'three-penny') True >>> any(c.isalpha() for c in 'threepenny') True >>> any(c.isalpha() for c in '.') False >>> any(c.isalpha() for c in ';') False >>> words2[:1000] ['Title', 'Oliver', 'Twist', 'Author', 'Charles', 'Dickens', 'Language', 'English', 'Character', 'set', 'encoding', 'UTF-8', 'START', 'OF', 'THIS', 'PROJECT', 'GUTENBERG', 'EBOOK', 'OLIVER', 'TWIST', 'Oliver', 'Twist', 'OR', 'THE', 'PARISH', 'BOY', 'S', 'PROGRESS', 'by', 'Charles', 'Dickens', 'Contents', 'I', 'TREATS', 'OF', 'THE', 'PLACE', 'WHERE', 'OLIVER', 'TWIST', 'WAS', 'BORN', 'AND', 'OF', 'THE', 'CIRCUMSTANCES', 'ATTENDING', 'HIS', 'BIRTH', 'II', 'TREATS', 'OF', 'OLIVER', 'TWIST', 'S', 'GROWTH', 'EDUCATION', 'AND', 'BOARD', 'III', 'RELATES', 'HOW', 'OLIVER', 'TWIST', 'WAS', 'VERY', 'NEAR', 'GETTING', 'A', 'PLACE', 'WHICH', 'WOULD', 'NOT', 'HAVE', 'BEEN', 'A', 'SINECURE', 'IV', 'OLIVER', 'BEING', 'OFFERED', 'ANOTHER', 'PLACE', 'MAKES', 'HIS', 'FIRST', 'ENTRY', 'INTO', 'PUBLIC', 'LIFE', 'V', 'OLIVER', 'MINGLES', 'WITH', 'NEW', 'ASSOCIATES', 'GOING', 'TO', 'A', 'FUNERAL', 'FOR', 'THE', 'FIRST', 'TIME', 'HE', 'FORMS', 'AN', 'UNFAVOURABLE', 'NOTION', 'OF', 'HIS', 'MASTER', 'S', 'BUSINESS', 'VI', 'OLIVER', 'BEING', 'GOADED', 'BY', 'THE', 'TAUNTS', 'OF', 'NOAH', 'ROUSES', 'INTO', 'ACTION', 'AND', 'RATHER', 'ASTONISHES', 'HIM', 'VII', 'OLIVER', 'CONTINUES', 'REFRACTORY', 'VIII', 'OLIVER', 'WALKS', 'TO', 'LONDON', 'HE', 'ENCOUNTERS', 'ON', 'THE', 'ROAD', 'A', 'STRANGE', 'SORT', 'OF', 'YOUNG', 'GENTLEMAN', 'IX', 'CONTAINING', 'FURTHER', 'PARTICULARS', 'CONCERNING', 'THE', 'PLEASANT', 'OLD', 'GENTLEMAN', 'AND', 'HIS', 'HOPEFUL', 'PUPILS', 'X', 'OLIVER', 'BECOMES', 'BETTER', 'ACQUAINTED', 'WITH', 'THE', 'CHARACTERS', 'OF', 'HIS', 'NEW', 'ASSOCIATES', 'AND', 'PURCHASES', 'EXPERIENCE', 'AT', 'A', 'HIGH', 'PRICE', 'BEING', 'A', 'SHORT', 'BUT', 'VERY', 'IMPORTANT', 'CHAPTER', 'IN', 'THIS', 'HISTORY', 'XI', 'TREATS', 'OF', 'MR.', 'FANG', 'THE', 'POLICE', 'MAGISTRATE', 'AND', 'FURNISHES', 'A', 'SLIGHT', 'SPECIMEN', 'OF', 'HIS', 'MODE', 'OF', 'ADMINISTERING', 'JUSTICE', 'XII', 'IN', 'WHICH', 'OLIVER', 'IS', 'TAKEN', 'BETTER', 'CARE', 'OF', 'THAN', 'HE', 'EVER', 'WAS', 'BEFORE', 'AND', 'IN', 'WHICH', 'THE', 'NARRATIVE', 'REVERTS', 'TO', 'THE', 'MERRY', 'OLD', 'GENTLEMAN', 'AND', 'HIS', 'YOUTHFUL', 'FRIENDS', 'XIII', 'SOME', 'NEW', 'ACQUAINTANCES', 'ARE', 'INTRODUCED', 'TO', 'THE', 'INTELLIGENT', 'READER', 'CONNECTED', 'WITH', 'WHOM', 'VARIOUS', 'PLEASANT', 'MATTERS', 'ARE', 'RELATED', 'APPERTAINING', 'TO', 'THIS', 'HISTORY', 'XIV', 'COMPRISING', 'FURTHER', 'PARTICULARS', 'OF', 'OLIVER', 'S', 'STAY', 'AT', 'MR.', 'BROWNLOW', 'S', 'WITH', 'THE', 'REMARKABLE', 'PREDICTION', 'WHICH', 'ONE', 'MR.', 'GRIMWIG', 'UTTERED', 'CONCERNING', 'HIM', 'WHEN', 'HE', 'WENT', 'OUT', 'ON', 'AN', 'ERRAND', 'XV', 'SHOWING', 'HOW', 'VERY', 'FOND', 'OF', 'OLIVER', 'TWIST', 'THE', 'MERRY', 'OLD', 'JEW', 'AND', 'MISS', 'NANCY', 'WERE', 'XVI', 'RELATES', 'WHAT', 'BECAME', 'OF', 'OLIVER', 'TWIST', 'AFTER', 'HE', 'HAD', 'BEEN', 'CLAIMED', 'BY', 'NANCY', 'XVII', 'OLIVER', 'S', 'DESTINY', 'CONTINUING', 'UNPROPITIOUS', 'BRINGS', 'A', 'GREAT', 'MAN', 'TO', 'LONDON', 'TO', 'INJURE', 'HIS', 'REPUTATION', 'XVIII', 'HOW', 'OLIVER', 'PASSED', 'HIS', 'TIME', 'IN', 'THE', 'IMPROVING', 'SOCIETY', 'OF', 'HIS', 'REPUTABLE', 'FRIENDS', 'XIX', 'IN', 'WHICH', 'A', 'NOTABLE', 'PLAN', 'IS', 'DISCUSSED', 'AND', 'DETERMINED', 'ON', 'XX', 'WHEREIN', 'OLIVER', 'IS', 'DELIVERED', 'OVER', 'TO', 'MR.', 'WILLIAM', 'SIKES', 'XXI', 'THE', 'EXPEDITION', 'XXII', 'THE', 'BURGLARY', 'XXIII', 'WHICH', 'CONTAINS', 'THE', 'SUBSTANCE', 'OF', 'A', 'PLEASANT', 'CONVERSATION', 'BETWEEN', 'MR.', 'BUMBLE', 'AND', 'A', 'LADY', 'AND', 'SHOWS', 'THAT', 'EVEN', 'A', 'BEADLE', 'MAY', 'BE', 'SUSCEPTIBLE', 'ON', 'SOME', 'POINTS', 'XXIV', 'TREATS', 'ON', 'A', 'VERY', 'POOR', 'SUBJECT', 'BUT', 'IS', 'A', 'SHORT', 'ONE', 'AND', 'MAY', 'BE', 'FOUND', 'OF', 'IMPORTANCE', 'IN', 'THIS', 'HISTORY', 'XXV', 'WHEREIN', 'THIS', 'HISTORY', 'REVERTS', 'TO', 'MR.', 'FAGIN', 'AND', 'COMPANY', 'XXVI', 'IN', 'WHICH', 'A', 'MYSTERIOUS', 'CHARACTER', 'APPEARS', 'UPON', 'THE', 'SCENE', 'AND', 'MANY', 'THINGS', 'INSEPARABLE', 'FROM', 'THIS', 'HISTORY', 'ARE', 'DONE', 'AND', 'PERFORMED', 'XXVII', 'ATONES', 'FOR', 'THE', 'UNPOLITENESS', 'OF', 'A', 'FORMER', 'CHAPTER', 'WHICH', 'DESERTED', 'A', 'LADY', 'MOST', 'UNCEREMONIOUSLY', 'XXVIII', 'LOOKS', 'AFTER', 'OLIVER', 'AND', 'PROCEEDS', 'WITH', 'HIS', 'ADVENTURES', 'XXIX', 'HAS', 'AN', 'INTRODUCTORY', 'ACCOUNT', 'OF', 'THE', 'INMATES', 'OF', 'THE', 'HOUSE', 'TO', 'WHICH', 'OLIVER', 'RESORTED', 'XXX', 'RELATES', 'WHAT', 'OLIVER', 'S', 'NEW', 'VISITORS', 'THOUGHT', 'OF', 'HIM', 'XXXI', 'INVOLVES', 'A', 'CRITICAL', 'POSITION', 'XXXII', 'OF', 'THE', 'HAPPY', 'LIFE', 'OLIVER', 'BEGAN', 'TO', 'LEAD', 'WITH', 'HIS', 'KIND', 'FRIENDS', 'XXXIII', 'WHEREIN', 'THE', 'HAPPINESS', 'OF', 'OLIVER', 'AND', 'HIS', 'FRIENDS', 'EXPERIENCES', 'A', 'SUDDEN', 'CHECK', 'XXXIV', 'CONTAINS', 'SOME', 'INTRODUCTORY', 'PARTICULARS', 'RELATIVE', 'TO', 'A', 'YOUNG', 'GENTLEMAN', 'WHO', 'NOW', 'ARRIVES', 'UPON', 'THE', 'SCENE', 'AND', 'A', 'NEW', 'ADVENTURE', 'WHICH', 'HAPPENED', 'TO', 'OLIVER', 'XXXV', 'CONTAINING', 'THE', 'UNSATISFACTORY', 'RESULT', 'OF', 'OLIVER', 'S', 'ADVENTURE', 'AND', 'A', 'CONVERSATION', 'OF', 'SOME', 'IMPORTANCE', 'BETWEEN', 'HARRY', 'MAYLIE', 'AND', 'ROSE', 'XXXVI', 'IS', 'A', 'VERY', 'SHORT', 'ONE', 'AND', 'MAY', 'APPEAR', 'OF', 'NO', 'GREAT', 'IMPORTANCE', 'IN', 'ITS', 'PLACE', 'BUT', 'IT', 'SHOULD', 'BE', 'READ', 'NOTWITHSTANDING', 'AS', 'A', 'SEQUEL', 'TO', 'THE', 'LAST', 'AND', 'A', 'KEY', 'TO', 'ONE', 'THAT', 'WILL', 'FOLLOW', 'WHEN', 'ITS', 'TIME', 'ARRIVES', 'XXXVII', 'IN', 'WHICH', 'THE', 'READER', 'MAY', 'PERCEIVE', 'A', 'CONTRAST', 'NOT', 'UNCOMMON', 'IN', 'MATRIMONIAL', 'CASES', 'XXXVIII', 'CONTAINING', 'AN', 'ACCOUNT', 'OF', 'WHAT', 'PASSED', 'BETWEEN', 'MR.', 'AND', 'MRS.', 'BUMBLE', 'AND', 'MR.', 'MONKS', 'AT', 'THEIR', 'NOCTURNAL', 'INTERVIEW', 'XXXIX', 'INTRODUCES', 'SOME', 'RESPECTABLE', 'CHARACTERS', 'WITH', 'WHOM', 'THE', 'READER', 'IS', 'ALREADY', 'ACQUAINTED', 'AND', 'SHOWS', 'HOW', 'MONKS', 'AND', 'THE', 'JEW', 'LAID', 'THEIR', 'WORTHY', 'HEADS', 'TOGETHER', 'XL', 'A', 'STRANGE', 'INTERVIEW', 'WHICH', 'IS', 'A', 'SEQUEL', 'TO', 'THE', 'LAST', 'CHAMBER', 'XLI', 'CONTAINING', 'FRESH', 'DISCOVERIES', 'AND', 'SHOWING', 'THAT', 'SUPRISES', 'LIKE', 'MISFORTUNES', 'SELDOM', 'COME', 'ALONE', 'XLII', 'AN', 'OLD', 'ACQUAINTANCE', 'OF', 'OLIVER', 'S', 'EXHIBITING', 'DECIDED', 'MARKS', 'OF', 'GENIUS', 'BECOMES', 'A', 'PUBLIC', 'CHARACTER', 'IN', 'THE', 'METROPOLIS', 'XLIII', 'WHEREIN', 'IS', 'SHOWN', 'HOW', 'THE', 'ARTFUL', 'DODGER', 'GOT', 'INTO', 'TROUBLE', 'XLIV', 'THE', 'TIME', 'ARRIVES', 'FOR', 'NANCY', 'TO', 'REDEEM', 'HER', 'PLEDGE', 'TO', 'ROSE', 'MAYLIE', 'SHE', 'FAILS', 'XLV', 'NOAH', 'CLAYPOLE', 'IS', 'EMPLOYED', 'BY', 'FAGIN', 'ON', 'A', 'SECRET', 'MISSION', 'XLVI', 'THE', 'APPOINTMENT', 'KEPT', 'XLVII', 'FATAL', 'CONSEQUENCES', 'XLVIII', 'THE', 'FLIGHT', 'OF', 'SIKES', 'XLIX', 'MONKS', 'AND', 'MR.', 'BROWNLOW', 'AT', 'LENGTH', 'MEET', 'THEIR', 'CONVERSATION', 'AND', 'THE', 'INTELLIGENCE', 'THAT', 'INTERRUPTS', 'IT', 'L', 'THE', 'PURSUIT', 'AND', 'ESCAPE', 'LI', 'AFFORDING', 'AN', 'EXPLANATION', 'OF', 'MORE', 'MYSTERIES', 'THAN', 'ONE', 'AND', 'COMPREHENDING', 'A', 'PROPOSAL', 'OF', 'MARRIAGE', 'WITH', 'NO', 'WORD', 'OF', 'SETTLEMENT', 'OR', 'PIN-MONEY', 'LII', 'FAGIN', 'S', 'LAST', 'NIGHT', 'ALIVE', 'LIII', 'AND', 'LAST', 'CHAPTER', 'I', 'TREATS', 'OF', 'THE', 'PLACE', 'WHERE', 'OLIVER', 'TWIST', 'WAS', 'BORN', 'AND', 'OF', 'THE', 'CIRCUMSTANCES', 'ATTENDING', 'HIS', 'BIRTH', 'Among', 'other', 'public', 'buildings', 'in', 'a', 'certain', 'town', 'which', 'for', 'many', 'reasons', 'it', 'will', 'be', 'prudent', 'to', 'refrain', 'from', 'mentioning', 'and', 'to', 'which', 'I', 'will', 'assign', 'no', 'fictitious', 'name', 'there', 'is', 'one', 'anciently', 'common', 'to', 'most', 'towns', 'great', 'or', 'small', 'to', 'wit', 'a', 'workhouse', 'and', 'in', 'this', 'workhouse', 'was', 'born', 'on', 'a', 'day', 'and', 'date', 'which', 'I', 'need', 'not', 'trouble', 'myself', 'to', 'repeat', 'inasmuch', 'as', 'it', 'can', 'be', 'of', 'no', 'possible', 'consequence', 'to', 'the', 'reader', 'in', 'this', 'stage', 'of', 'the', 'business', 'at', 'all', 'events', 'the', 'item', 'of', 'mortality', 'whose', 'name', 'is', 'prefixed', 'to', 'the', 'head', 'of', 'this', 'chapter', 'For', 'a', 'long', 'time', 'after', 'it', 'was', 'ushered', 'into', 'this', 'world', 'of', 'sorrow', 'and', 'trouble', 'by', 'the', 'parish', 'surgeon', 'it', 'remained', 'a', 'matter', 'of', 'considerable', 'doubt', 'whether', 'the', 'child', 'would', 'survive', 'to', 'bear', 'any', 'name', 'at', 'all', 'in', 'which', 'case', 'it', 'is', 'somewhat', 'more', 'than', 'probable', 'that', 'these', 'memoirs', 'would', 'never', 'have', 'appeared', 'or', 'if', 'they', 'had', 'that', 'being', 'comprised'] >>> >>> len(words2) 160639 >>> len(words) 199836 >>> len1 = [len(word) for word in words2[0:1000]] >>> len2 = [len(word) for word in words2[1000:2000]] >>> len3 = [len(word) for word in words2[2000:3000]] >>> max(len1) 15 >>> max(len2) 14 >>> max(len3) 20 >>> plt.hist(len1, range(1,21), histtype='step', label='1st 1000') (array([ 53., 156., 189., 139., 124., 103., 84., 42., 38., 37., 14., 13., 5., 1., 2., 0., 0., 0., 0.]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.hist(len2, range(1,21), histtype='step', label='2nd 1000') (array([ 41., 160., 240., 163., 115., 106., 59., 39., 38., 13., 14., 9., 1., 2., 0., 0., 0., 0., 0.]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.hist(len3, range(1,21), histtype='step', label='3rd 1000') (array([ 48., 155., 228., 169., 100., 85., 53., 55., 30., 22., 20., 12., 13., 3., 3., 1., 0., 0., 3.]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.xticks(range(1,21)) ([, , , , , , , , , , , , , , , , , , , ], [Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, '')]) >>> plt.legend() >>> plt.show() >>> >>> len1 = [len(word) for word in words2[0:5000]] >>> len2 = [len(word) for word in words2[5000:10000]] >>> max(len1) 20 >>> max(len2) 20 >>> plt.hist(len1, range(1,21), histtype='step', label='1st 5000') (array([2.610e+02, 7.790e+02, 1.165e+03, 8.540e+02, 5.500e+02, 4.780e+02, 2.990e+02, 1.810e+02, 1.720e+02, 9.800e+01, 6.800e+01, 4.800e+01, 2.700e+01, 8.000e+00, 8.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 3.000e+00]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.hist(len2, range(1,21), histtype='step', label='2nd 5000') (array([ 221., 806., 1205., 872., 514., 429., 302., 218., 215., 114., 63., 21., 11., 5., 0., 2., 0., 0., 2.]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.xticks(range(1,21)) ([, , , , , , , , , , , , , , , , , , , ], [Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, '')]) >>> plt.legend() >>> plt.show() >>> >>> len1 = [len(word) for word in words2[0:10000]] >>> len2 = [len(word) for word in words2[10000:20000]] >>> plt.hist(len1, range(1,21), histtype='step', label='1st 10000') (array([ 482., 1585., 2370., 1726., 1064., 907., 601., 399., 387., 212., 131., 69., 38., 13., 8., 3., 0., 0., 5.]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.hist(len2, range(1,21), histtype='step', label='2nd 10000') (array([4.960e+02, 1.584e+03, 2.440e+03, 1.922e+03, 9.130e+02, 9.250e+02, 5.700e+02, 3.680e+02, 3.120e+02, 2.780e+02, 9.800e+01, 4.900e+01, 2.600e+01, 7.000e+00, 7.000e+00, 3.000e+00, 0.000e+00, 1.000e+00, 1.000e+00]), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), []) >>> plt.xticks(range(1,21)) ([, , , , , , , , , , , , , , , , , , , ], [Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, '')]) >>> plt.legend() >>> plt.show() >>>