Difficulty in Understanding the syntax of a line of code

I am facing a small doubt in understanding the syntax of line
plt.scatter(dist[:, 0],dist[:,1]). I am not able to understand that how we gave the input using slicing operator and what 0 and 1 stands for , do they stand for columns , if yes then why we used comma after slicing operator …

plt.scatter( list_of_x_coordinates , list_of_y_coordinates )
yes 0, 1 stands for column number, they are separated by comma because of the above syntax.
“:” is used for slicing and specifying the ranges
For eg:

  1. x[:] means all elements of list x
  2. x[4:] means all elements from 4 index( 5 position) to last
  3. x[: 10] means first 10 elements(index 0 to 9, index 10 not included)
  4. x[4:10] means elements from index 4 to index 9 ( excluding index 10)
  5. x[:,0] means all rows but only 0th column (List of all x coordinates)
  6. x[:,1] means all rows but only 1st column (List of all y coordinates)