import random # N, S, W, E choices = [(0, 1), (0, -1), (-1, 0), (1, 0)] def rand_walk(n, p0=[]): if p0 is None: p0 = [0, 0] pass