Vote count:
0
I'm looking to take an array of elements and return a randomized version of the array in a function.
For example:
function Randomize-List
{
Param(
[int[]]$InputList
)
...code...
return 10,7,2,6,5,3,1,9,8,4
}
$a = 1..10
Write-Output (Randomize-List -InputList $a)
10
7
2
...
You get the idea. No idea of how to approach this, I'm new to Powershell, coming from a Python background.
asked 1 min ago
Randomize a List of Elements in a Powershell Array
Aucun commentaire:
Enregistrer un commentaire