How to make a list of X,Y coordinates and print on multiple lines

I’d like to make a function to print a list of X,Y coordinates on a map with multiple levels represented by 'X'. Each 'X' represents one coordinate. I see a function like this

def map_coordinates(x,y)
    for x in range(10):
       for y in range(10):
           print("X"*5)

I hope to get output like this

XXXXX
XXXXX
XXXXX

How do I do this function?


Source: python

Leave a Reply