i need some help to solve my problem with python. My task is to generate 4 Elements of my list "stones", which i want to put in my List "L". The letters are colours and +,-,.. are forms and i'm allowed to just use every colour and form one time in my 4 Elements, which is why i struggle with this task. my code so far:
L = []
stones = ["R+", "R-", "R*", "R_", "G+", "G-", "G*", "G_", "B+", "B-", "B*", "B_", "W+", "W-", "W*", "W_"]
stone1 = random.choice(stones)
L.append(stone1)
stones.remove(stone1)
#if stone1[1] in stones:
#del stones
as you can hopefully see, i get a random value of "stones" and can put it in my list L and i delete it out of the stones list. The problem now is that i dont know how to compare stone1 to the other stones.elements. f.e. if i get stone1=R+, i want to delete all items in "stones" which include R and +. The last 2 lines are garbage, so don't worry.. Thanks for your help!