Trying to exclude an elements in an array if it overlaps with another array in Python
I am writing code that pseudorandomises positions from an array: centre_pos = [‘A’,’B’,’C’,’D’,’E’] corner_pos = [‘1′,’2′,’3′,’4’] def position_generator(): #for centre, corner in zip(centre_pos, corner_pos): random_centre = random.choice(centre_pos) random_corner = random.choice(corner_pos) #if random_centre and random_corner in exclusion: #else: return random_centre, random_corner However, I want to exclude certain combinations of centre_pos and corner_pos. For example if B… Read More Trying to exclude an elements in an array if it overlaps with another array in Python