I want to replace 'nf' with 1.0, so that the resulting string should be:
I tried various approaches using find(), re.sub but I am not able to make it work.
eg. re.sub('nf', '1.0', str) replaces all occurrences of nf. also re.sub('\bnf\b', '1.0', str) does
not work either as 'nf' can be anywhere in the string.