Python: I need help writing a function that uses a pair and returns sets of carnality of 2 : I need help writing some python code that input is a list A that represents a set and whose output is a list of the subsets of A that have cardinality of 2.

For instance, if A = [a, b, c], then
listPairs(A) = [[a, b], [a, c], [b, c]].