python shuffle list

Опубликовано: 18 Октябрь 2024
на канале: Softhints - Python, Linux, Pandas
3,650
31

Code and details:

http://blog.softhints.com/python-shuf...

Python shuffle list of numbers / range
Python shuffle list of numbers
Python shuffle list of strings
Python shuffle array with seed
Python shuffle list of lists

import random
nums = [x for x in range(20)]
random.shuffle(nums)
print(nums)


---------------------------------------------------------------------------------------------------------------------------------------------------------------
Code store

https://bitbucket.org/softhints/

Socials

Facebook:   / 435421910242028  
Facebook:   / softhints  
Twitter:   / softwarehints  


If you really find this channel useful and enjoy the content, you're welcome to support me and this channel with a small donation via PayPal and Bitcoin.

PayPal donation https://www.paypal.me/fantasyan
Bitcoin: 1DBZu6N9JTpRDdc9QChLZnX3v2iVRaQ4ym