Array Replace Python Function Example