*** Genesis ***
1:1 In the beginning God created the heaven and the earth.
1:2 And the earth was without form, and void; and darkness was upon the face of
the deep. And the Spirit of God moved upon the face of the waters.
*** Exodus ***
1:1 Now these are the names of the children of Israel, which came into Egypt;
every man and his household came with Jacob.
1:2 Reuben, Simeon, Levi, and Judah,
This text consists of a sequence of fragments.Each fragment consists of one or more consecutive lines and the different fragments are separated from each other by at least one blank line. Fragments that indicate the start of a new book, begin and end with three asterisks surrounding the name of the book (with an extra space before and after the name). All other fragments represent successive Bible verses. A Bible verse always begins with $$h:v$$ and a space, where $$h \in \mathbb{N}_0$$ indicates the number of the chapter, and $$v \in \mathbb{N}_0$$ the number of a verse.
Write a function verses to which the name of a text file is to be passed. This text file should contain the text of the Bible, in the format described above. The function must return a dictionary that depicts all verses from the file on their corresponding text. The keys of this dictionary are strings with the format book chapter:verse, and are displayed on the text of the Bible verse with the verse number verse, from the chapter with the number chapter, from the book with the name book. The text of a verse is formed by putting all the lines from which it consists after each other, separated by a single space. Before combining the lines, any white space in the beginning and the end of the lines must first be removed.
In the following example session we assume that the file bible.txt 2is in the current directory.
>>> index = verses('bible.txt')
>>> index['Revelation 3:20']
'Behold, I stand at the door, and knock: if any man hear my voice, and open the door, I will come in to him, and will sup with him, and he with me.'
>>> index['Genesis 3:10']
'And he said, I heard thy voice in the garden, and I was afraid, because I was naked; and I hid myself.'