Check If Two Array Contains Python String Replace Not Working