Updated sed script to use PYTHON