In this code example all pairs of numbers in a list are recognized and output with indication of the position | Learn Python for free