Doubt in get_pairs function

This is from PCA lab in Course 3, Week 2
I have one doubt in the second while block of the get_pairs function.
Suppose the random integers generated are 3 and 4 and (3,4) tuple is already enlisted in tuples list.
But according to the while loop test condition, this will evaluate x==y to False, and then further conditions after the and operator won’t be checked and the entire while loop condition will be rendered false. Thus, (3,4) would be added twice to the tuples list. So, shouldn’t the and operator be replaced by the or operator instead?


Thanks for spotting that out! It should be or instead. I will let the course team know about it.