Shuffle Array

Randomly shuffle the elements of an array (Fisher-Yates algorithm).

Code

General
import random
items = arr.copy()
random.shuffle(items)
return items

Parameters

Array to shuffle

Server

More Python Snippets