“Lista de shuffle python com semente” Respostas de código

Lista de shuffle python

import random
number_list = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70]
print ("Original list : ",  number_list)

random.shuffle(number_list) #shuffle method
print ("List after shuffle  : ",  number_list)
Kodi4444

Lista de shuffle python com semente

>>> import random
>>> x = [1, 2, 3, 4, 5, 6]
>>> random.Random(4).shuffle(x)
>>> x
[4, 6, 5, 1, 3, 2]
>>> x = [1, 2, 3, 4, 5, 6]
>>> random.Random(4).shuffle(x)
>>> x
[4, 6, 5, 1, 3, 2]
Scary Seal

Respostas semelhantes a “Lista de shuffle python com semente”

Perguntas semelhantes a “Lista de shuffle python com semente”

Mais respostas relacionadas para “Lista de shuffle python com semente” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código