Python Modify Array Element Assignment