I have a file containing records with 4 values, eg:
1,Genesis,Gen,Gen
2,Eksodus,Eks,Exo
3,Levitikus,Lev,Lev
4,Numeri,Num,Num
5,Deuteronomium,Deut,Deu
6,Josua,Jos,Jos
7,Rigters,Rig,Jdg
8,Rut,Rut,Rth
9,1 Samuel,1 Sam,1Sa
I need to read these into an array and I then need to read a second file and in each record of this file replace occurrences of the 3rd field in the first file (Gen, Eks, Lev, Num, Deut etc.) with the first field (1,2,3, etc. followed by a fullstop, eg 1., 2., 3.).
So if the second has a record reading:
Ps. 19:3; Num 3:1…
This needs to be replaced by:
19.19:3; 4.3:1…
How would I achieve this? I have just started learning Python, so I am really a novice.
I have a sample set of files and my attempt which I can send to someone who is prepared to look at it.