1. (Indexing, 23 pts} At the end of books, there usually is an index that lists the pages where a certain word appears. In this problem, you will create an index fora text but, instead of the page number, you will use the line numbers. 7ou are to implement the function index [fname, letter] that takes as input the name of the text le and the rst letter of the words for which you are to create the line number index. For each word that begins with 'letter', you are to print the corresponding line numbers. You should a. open and read the le only once; use readline 5. Remove all punctuation from the text 5. For each word that begins with the specied letter, nd all the line numbers in which the letter appears. d. Print the total number of lines in the text and the number of words that begin with the specied letter. Use a dictionary to store results {word: list of line numbedsl}. For each word, a line number should be listed only once, for example, 'the' appears 3 time on line 253; 253 should not be listed 3 times, only once. In the output, the line numbers should be separated by commas, but they are not printed as lists [no brackets]. The words in the output should be in alphabetical order, i.e. a 2. }}J indczE'Pridg_and_?refudice.txt','1'] Hard Linn 19111:, 15555: 2159 155555: 951, 2555, 2919 loop 133, 235. 297, 261, 311, 995, 697, 653, 667. 669, 919, 957, 1917. 1325, 2327, 2973, 2523, 2393, 2977, 3965. 3567, 1519, 1591, 1595, 9211 tagging 1959, 1553, 5523, 5933 loops 1991, 2337, 2399 IgPt 921, 991, 1995, 1595, 1999, 1955, 1955, 2951, 2511, 2911, 1511, 1525, 1591, 1595, 1551, 9559, 9291 1111 3323 lillpd 2971, 3051, 3993, 3569 kind 215I 223, il3, 545, 715, 937, 949, 911, 1333, 1133, 1167, 1255, 1335, 1357, 1491, 1511, 1597, 1637, 1663, 1153, 1 767, 1365, 2371, 2137, 2119, 2129, 2153, 2131, 2293, 2327, 2395, 2995, 2533. 2677, 2733, 2335, 2331, 2935, 2971, 2977, 2939, 2991, 1519, 1559, 1591, 1199, 1211, 1251, 1951, 1991, 1951, 1959, 1999, 1911, 9521, 9195, 9215, 9259 kinder 2137, 9225 lindgnt 2249 kindled 3515 kindly 927, 1259, 1957, 1637, 1361, 2159, 2237 11n5n==1 111, 111, 259, 951, 959, 551, 555, 1511, 1111, 1991, 1155, 1111, 1155, 2515, 2211, 2291, 2251, 2151, 2125, 2111, 2339, 2353, 3231, 3221, 3241, 3613, 3711, 3995, 4199 tindred 1951 Linda 2395 tiny 221 lingdum 151, 1251, 1551, 1211 kiss 2995 kissed 3961, 3735 kitchen S51 knBBa 2355 1559 121, 111, 259, 111, 595, 151, 951, 1511, 1551, 1129, 1191, 1511, 1955, 1911, 2551, 2219, 2215, 2291, 2251, 2191, 2999, 2695, 2737, 2711, 2771, 2931. 2963. 2375, 2395, 2927, 2931, 3331, 3311. 3399. 3365, 3217, 3259, 3367, 3335. 3961. 3535 , 1591, 1551, 1511, 1191, 1159, 1929, 1999, 9999, 9519, 9511, 9111, 9199, 9211, 9225 tnighthnod 221, 1153 know 31, 37, 99, 65, 77, 93. 111, 117, 121, 137, 161, 175, 199, 233, 217, 231, 235, 275, 237, 259. 293, 299, 339, 335, 995, 555, 559, 525, 595, 155, 111, 151, 115, 199, 195, 911, 991, 599, 951, 951, 991, 1551, 1511, 1515, 1559, 1111, 1115, 112 1, 1125, 1127. 1153. 1195, 1255, 1263. 1265, 1267, 1395, 1351. 1353, 1369, 1371, 1917, 1453, 1955. 1969, 1977, 1523, 1531, 1 991, 1555, 1519, 1651, 1595. 1151, 1123, 1191, 1155, 1151, 1131, 1191, 1991. 1951, 1915, 1991, 1991, 2551, 2511, 2515, 2519, 2591, 2591, 2595, 2115, 2111, 2195, 2111, 2195, 2229, 2291, 2295, 2291, 2295, 2151, 2925, 2155, 2191, 2925, 2921, 2915, 2911 , 2965, 2561, 2593, 2651, 2639, 2659, 2669, 2713, 2721. 2725, 2731, 2775, 2791, 2799, 2337. 2395. 2399, 2361, 2371, 2331, 29 15, 2919, 2921, 2925, 2921, 2929, 2911, 2915, 2911, 2995, 1551, 1521, 1511, 1515, 1595, 1551, 1121, 1191, 1199, 1151, 1251, 3215, 3223, 3293, 3261, 3299, 3331, 3333, 3337, 3399, 3363, 3367, 3331, 3397. 3939, 3919, 3459, 3471, 3475, 3991, 3993, 3997 , 1999, 1515, 1511, 1519, 1529, 1551, 1555, 9515, 9591, 1551, 1599, 1119, 1925, 1911, 1999, 1551, 1995, 1951, 1911, 1911, 19 99, 1591, 9551, 9551, 9599, 9551, 9555, 9551, 9159, 9155, 9159, 9125. 9191, 919a, 9195, 9251 knowing 567, 579, 953, 1131, 1229, 1733, 1357, 1935. 2129, 2253, 2255, 2311, 2957, 2555, 2557, 2629, 2731, 2397, 2997, 33 51, 1511, 1291, 1251, 1551, 1551, 1991 knowledge 39, 313, 395, 575, 1535, 1939. 1991, 1925, 1933, 2367, 2233, 2239. 2293. 2935, 2461, 2931, 3257, 3263, 9375. 9259 111mm 21. 129, 291, 291, 1511, 1599. 1125, 1991, 1.999, 1991, 1521. 1519, 1591, 1159, 1.999, 1915, 2595, 2125, 2211. 2215 , 2251, 2255, 2211, 2511, 2515, 2529, 2521, 2525, 2551. 2559, 2551, 2125, 2191, 2155, 2151. 2511, 2525, 2995, 2959, 2515. so 31, 3373, 3333, 3237, 3365. 3373, 3535, 3325, 3971, 3935, 9369, 9377. 9291 15555 1155, 1111, 2195, 2551, 2119, 2921, 1521, 1991, 1511 @555: are 9272 lion: in th: book. Theta 99:5 23 words that begin with. " k "'