mirror of
https://github.com/ray-x/navigator.lua
synced 2024-11-15 18:12:50 +00:00
15 lines
279 B
Python
15 lines
279 B
Python
from random import shuffle
|
|
a = list(range(5))
|
|
|
|
def go(beg, c, b):
|
|
if beg >= len(a):
|
|
print(a )
|
|
for i in range(beg, len(a)):
|
|
a[beg], a[i] = a[i], a[beg]
|
|
go(beg + 1)
|
|
a[beg], a[i] = a[i], a[beg]
|
|
print(a, b)
|
|
|
|
go(0, 1, 4)
|
|
shuffle([1, 2,3 ])
|