I have a list of tuples such as
list_tuples = [(2,3), (4,7), (3,2), (7,8), (7,4)]
I want to find the tuples in this list whose elements are the same but reversed order. in this case my output would be:
new_list_tuples = [(2,3), (3,2), (4,7), (7,4)]
I've tried the below code but apparently it doesn't work because it doesn't make sense:
for i in lista:
if i[0] == i[1] and i[1] == i[0]:
print(i)
can anyone help me with this? Many thanks in advance!