Cleaning up data using python

Hello Guys,
Please I need help. I am switching career path to Data engineering. I have this project I am currently working on but need help.

I have the following data stored in a variable called damages, it has some missing data (see below).

damages = [‘Damages not recorded’, ‘100M’, ‘Damages not recorded’, ‘40M’, ‘27.9M’, ‘5M’, ‘Damages not recorded’, ‘306M’, ‘2M’, ‘65.8M’, ‘326M’, ‘60.3M’, ‘208M’, ‘1.42B’, ‘25.4M’, ‘Damages not recorded’, ‘1.54B’, ‘1.24B’, ‘7.1B’]

I have been asked to write a function that returns a new list of updated damages where the recorded data is converted to float values and the missing data is retained as "Damages not recorded" .

I was given a hint:
The function iterates through the damages list and uses string parsing and the following conversion dictionary to convert the data.
conversion = {“M”: 1000000,
“B”: 1000000000}

Can someone please give me some clues as to where I can begin?

Thanks.