Multihead And Multidimensional Array Code In Python To Reverse