As title, I have a list and I want to find the element that appear twice.
For instance, a = [1,2,3,3,4] and I want to get "3".
I came up with a for loop using list.count(element)==2 to get the number but it's quit time wasting. Is there other ways without using for loop?
thanks a lot