Python Forum
Regarding how to randomizing list with having equal probability
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regarding how to randomizing list with having equal probability
#8
Problem with using combinations is the order is not random. After seeing as few as 3-4 sets, even if they are randomly selected, you'll begin to predict which image might come next.
from itertools import combinations

for combination in combinations((1, 2, 3, 4), 3):
    print(combination)
(1, 2, 3)
(1, 2, 4)
(1, 3, 4)
(2, 3, 4)
Reply


Messages In This Thread
RE: Regarding how to randomizing list with having equal probability - by deanhystad - Nov-05-2022, 12:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Check if two matrix are equal and of not add the matrix to the list quest 3 925 Jul-10-2023, 02:41 AM
Last Post: deanhystad
  detect equal sequences in list flash77 17 3,114 Oct-28-2022, 06:38 AM
Last Post: flash77
  is there equal syntax to "dir /s /b" kucingkembar 2 1,060 Aug-16-2022, 08:26 AM
Last Post: kucingkembar
  How to draw the Probability Density Function (PDF) plot regardless of sampe size? amylopectin 3 3,721 Mar-02-2022, 09:34 PM
Last Post: Larz60+
  Can a variable equal 2 things? Extra 4 1,574 Jan-18-2022, 09:21 PM
Last Post: Extra
  finding probability of exceding certain threshold Staph 1 1,973 Dec-14-2019, 04:58 AM
Last Post: Larz60+
  Not equal a dictionary key value bazcurtis 2 1,989 Dec-11-2019, 11:15 PM
Last Post: bazcurtis
  Randomizing Color Output ammorgan 0 2,036 Dec-27-2018, 03:31 AM
Last Post: ammorgan
  Realized variance and daily probability distribution petergarylee 1 2,499 Jul-06-2018, 02:21 PM
Last Post: buran
  Misunderstanding with the “if” statement and “not equal” scriptoghost 6 4,517 Jun-23-2017, 09:43 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020