not x axis labels python

plt.gca().axes.get_xaxis().set_visible(False)
plt.gca().axes.get_yaxis().set_visible(False)

Here is what the above code is Doing:
1. We’re creating a figure with a size of 8×8 inches.
2. We’re creating an Axes object within the figure.
3. We’re plotting a random walk (as a line plot) using the random_walk() function.
4. We’re setting the x- and y-axis limits (axis() is a shortcut for axis(‘scaled’)).
5. We’re hiding the axis spines for the top, right, left, and bottom axes.
6. We’re showing the plot.