How can I read a text file in line by line and assign :sometext: lines to a dictionary's keys and next to :somtext: lines to a dictionary's values? For example, how could I make the below new line delimited list:
my text file:
:II: Own BIC / TID
COBADEFFDOC BIC could not be resolved
:IO: Correspondents BIC / TID
abc BIC identified as:
xyz AG,THE,pqe BRANCH
zxc
output:
dictionary key -> :II:
dictionary value -> Own BIC / TID COBADEFFDOC BIC could not be resolved
dictionary key -> :IO:
dictionary value -> Correspondents BIC / TID
abc BIC identified as:
xyz AG,THE,pqe BRANCH
zxc
Thanks in advance.