I want to replace value of key(i.e db_host, addons_path) with $$$$.
db_host
addons_path
$$$$
Input text file contains the following:
#
use fileinput module.
fileinput
import fileinput for line in fileinput.input('data.txt',backup='.bak',inplace=1): print line.rstrip().replace('Python','Perl') #or print line.replace('Python','Perl'),