Given an initial list, I want to change the list using one function call : This:
A=[cat,dog,ostritch]
To This:
A=[sal,fred,martin]
I understand we can do
A.replace('cat', 'sal')
A.replace('dog', 'fred')
I would like to make some sort of mapping ie so I can just call the replace function only once. ie:
replace mapping=[cat:sal,dog:fred, ostritch:martin]
A.replace(A,replace_mapping)