Breaking out X/Y locations into variables

So I have this in my code " location = self.driver.find_element_by_name(“Spell To Execute”).location" and when I print it out I get “{‘x’: 1175, ‘y’: 302}”. My question is how to break out the X and Y coordinates into different variables so I can use them for a click drag.

Thanks!

It really depends on what programming language you are using. Your code looks loosely typed so I’m going to guess Python:

https://www.tutorialspoint.com/python_data_structure/python_hash_table.htm

Below mentioned is a Java code for drag and drop using coordinates, hope it can help you.

   int startX = 200;
    int startY = 250;
    int endX = 200;
    int endY = 400;
    Point start = new Point(startX, startY);
    Point end = new Point(endX, endY);

touchAction.press(PointOption.point(startX, startY))
		.perform()
		.moveTo(PointOption.point(endX, endY))
		.release().perform();