Hi all,
Can anyone please explain me whats going on here? Ive never seen this syntax before.
Can anyone please explain me whats going on here? Ive never seen this syntax before.
def judgeCircle(cls, moves): def moves_xy(moves): return { 'R': [1, 0], 'L': [-1, 0], 'U': [0, 1], 'D': [0, -1] }[moves] x = 0 y = 0 for move_temp in moves: coor = moves_xy(move_temp) x = x + coor[0] y = y + c[icode]oor[1]Im really puzzled with the syntax moves_xy. Can anyone explain me understand this new format?