I want to randomize a range of numbers without "random.shuffle." Instead it would be using "randint(0, n-1)"
If I put in 4 into the function it could return [1,3,2,0] or [3,1,0,2]. I know that starting with an empty list and running through with a while list would work.

Recommended Answers

Why are you announcing this?

Jump to Post

All 2 Replies

Why are you announcing this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.