Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1#!/usr/bin/env python3 

2 

3"""Solution to chapter 7, exercise 35: gematria_dict""" 

4 

5import string 

6 

7 

8def gematria_dict(): 

9 """Function that returns a dictionary of ASCII values 

10for all lowercsae letters. The keys are the letters, and 

11the values are the numbers, starting with 1 for 'a'. 

12""" 

13 return {char: index 

14 for index, char in enumerate(string.ascii_lowercase, 1)}