hello list I asked yesterday how we can "declare" an array in python. Thanks Brian van den Broek and Frank Schley for your responses.
A[None] * n works for me. To answer Brian's question, I was writing the standard backtracking procedure to find the permutations of 1..n taken r at a time. def permutations (n, r): A, Used = [None] * (r+1), [False] * (n+1) def choose (m): if m > r: print A[1:], else: for j in range (1, n+1): if not Used [j]: Used [j] = True A[m] = j choose (m+1) Used [j] = False choose (1) Thanks Logesh Pillay _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor