Does Python List Comprehension with 2 if conditions work properly?
I have used an existing code (for loop) and tried to do the same task with list comprehension and 2 conditional expressions, but the result is not as it should be. The conditional statement is exactly the same In both code samples. The code should pick doublicates from a source list and put them to separate list. Here are both codes: https://code.sololearn.com/cmMwjVDBbfcO/?ref=app