Modifying Array Value Python Code