I have a list looking as follows
lst = ['.ab.cd.ef.gh.', '.ij.kl.mn.op.']
In each item, I want to replace item[0] with a * and item[-1] with a $.
I tried to use:
[item.eplace(item[0], '*') for item in lst]
but the result is that all . get replaced with * irrespective of position.
Appreciating your help!