Python Forum
Preventing Duplicate Placement in 2D Array
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Preventing Duplicate Placement in 2D Array
#3
[quote="deanhystad" pid='152955' dateline='1643928996']
Create a list of tuples for all possible combinations of row and col. Shuffle the list or randomly remove combinations from the list. This example shuffles the fields list and pops the combinations off the end.

Thanks Dean, this is actually incredibly helpful and the itertools module is definitely going to help in the rest of the code.
Reply


Messages In This Thread
RE: Preventing Duplicate Placement in 2D Array - by nickdavis2017 - Feb-03-2022, 11:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Data placement nboogerz 1 2,470 May-16-2020, 11:20 AM
Last Post: snippsat
  Automated Bet placement redmercury 2 10,382 Dec-04-2019, 10:53 AM
Last Post: redmercury
  Preventing: IndexError: list index out of range PappaBear 1 7,249 Jun-03-2019, 05:50 PM
Last Post: SheeppOSU
  Preventing useless multiple disk writes Steffenwolt 9 6,149 Jul-28-2018, 06:39 PM
Last Post: gontajones
  Question with while loop placement Tunechi 2 3,916 May-16-2018, 02:54 AM
Last Post: Tunechi

Forum Jump:

User Panel Messages

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