This is a python code to calculate Manhattan Distance in 1D list.