Python Dynamic Array Implementation