Answer the question
In order to leave comments, you need to log in
How to find repetition in a list in Python?
There is a list
list = ['R ', 'L ', 'U ', 'D ', 'F ', 'B ', "R' ", "L' ", "U' ", "D' ", "F' ", "B' ", 'R2 ', 'L2 ', 'U2 ', 'D2 ', 'F2 ', 'B2 ', "R'2 ", "L'2 ", "U'2 ", "D'2 ", "F'2 ", "B'2 "]
Answer the question
In order to leave comments, you need to log in
a = ['R ', 'L ', 'U ', 'D ', 'F ', 'B ', "R' ", "L' ", "U' ", "D' ", "F' ", "B' ", 'R2 ', 'L2 ', 'U2 ', 'D2 ', 'F2 ', 'B2 ', "R'2 ", "L'2 ", "U'2 ", "D'2 ", "F'2 ", "B'2 "]
b = {i.replace("'", "") for i in a}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question