Blog: 2026-07-12: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

12 July 2026

  • curprev 12:0912:09, 12 July 2026Razzi talk contribs 674 bytes +674 Created page with "Making distinct pairs out of a group of 15 <pre> In [33]: def permute(l, n): ...: copy = list(l) ...: new = [] ...: index = 0 ...: for _ in range(len(l)): ...: new.append(copy.pop(index)) ...: index = (index + n) % max(len(copy), 1) ...: return new ...: In [34]: permute(ns, 1) Out[34]: [1, 3, 5, 7, 9, 11, 13, 15, 4, 8, 12, 2, 10, 6, 14] In [35]: permute(ns, 0) Out[35]: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,..."