Replace Items In Array Python Definition