@@ -0,0 +1,302 @@
+from collections import Counter%0Afrom functools import reduce%0A%0APAIRS = %7B'N':'S','S':'N','E':'W','W':'E'%7D%0A%0Adef directions(goal):%0A    c=Counter(goal)%0A    return list(%0A              reduce(lambda x,y: x+y, %0A                 %5B%5Bd%5D*(c%5Bd%5D - c%5BPAIRS%5Bd%5D%5D) for d in 'NSEW'%5D%0A                    )%0A               )%0A

Create 6kyu_shorter_path.py