i have a 10x10 grid. this grid is in a dictionary called p_w. when i print out p_w i get this:
{(7, 3): 0.01, (6, 9): 0.01, (0, 7): 0.01, (1, 6): 0.01, (3, 7): 0.01, (2, 5): 0.01, (8, 5): 0.01, (5, 8): 0.01, (4, 0): 0.01, (9, 0): 0.01,
(6, 7): 0.01, (5, 5): 0.01, (7, 6): 0.01, (0, 4): 0.01, (1, 1): 0.01, (3, 2): 0.01, (2, 6): 0.01, (8, 2): 0.01, (4, 5): 0.01, (9, 3): 0.01,
(6, 0): 0.01, (7, 5): 0.01, (0, 1): 0.01, (3, 1): 0.01, (9, 9): 0.01, (7, 8): 0.01, (2, 1): 0.01, (8, 9): 0.01, (9, 4): 0.01, (5, 1): 0.01,
(7, 2): 0.01, (1, 5): 0.01, (3, 6): 0.01, (2, 2): 0.01, (8, 6): 0.01, (4, 1): 0.01, (9, 7): 0.01, (6, 4): 0.01, (5, 4): 0.01, (7, 1): 0.01,
(0, 5): 0.01, (1, 0): 0.01, (0, 8): 0.01, (3, 5): 0.01, (2, 7): 0.01, (8, 3): 0.01, (4, 6): 0.01, (9, 2): 0.01, (6, 1): 0.01, (5, 7): 0.01,
(7, 4): 0.01, (0, 2): 0.01, (1, 3): 0.01, (4, 8): 0.01, (3, 0): 0.01, (2, 8): 0.01, (9, 8): 0.01, (8, 0): 0.01, (6, 2): 0.01, (5, 0): 0.01,
(1, 4): 0.01, (3, 9): 0.01, (2, 3): 0.01, (1, 9): 0.01, (8, 7): 0.01, (4, 2): 0.01, (9, 6): 0.01, (6, 5): 0.01, (5, 3): 0.01, (7, 0): 0.01,
(6, 8): 0.01, (0, 6): 0.01, (1, 7): 0.01, (0, 9): 0.01, (3, 4): 0.01, (2, 4): 0.01, (8, 4): 0.01, (5, 9): 0.01, (4, 7): 0.01, (9, 1): 0.01,
(6, 6): 0.01, (5, 6): 0.01, (7, 7): 0.01, (0, 3): 0.01, (1, 2): 0.01, (4, 9): 0.01, (3, 3): 0.01, (2, 9): 0.01, (8, 1): 0.01, (4, 4): 0.01,
(6, 3): 0.01, (0, 0): 0.01, (7, 9): 0.01, (3, 8): 0.01, (2, 0): 0.01, (1, 8): 0.01, (8, 8): 0.01, (4, 3): 0.01, (9, 5): 0.01, (5, 2): 0.01}
i am trying to get it so that its print out in order of coordinates. for example
{(0,0):0.01, (0.1):0.01, (0,2):0.01... etc
how do i order the tuples in the dictionary i curreny have:
p_w = {}
for x in range(xwhale):
for y in range(ywhale):
p_w[x,y] = 0.01
self.p_w = p_w
print p_w
PS. im still quite new to python