diff --git a/pair_sum.py b/pair_sum.py index e69de29..82945c1 100644 --- a/pair_sum.py +++ b/pair_sum.py @@ -0,0 +1,8 @@ +def pairSum(l,n): + a=[] + if len(l)>2: + for i in l: + for j in l: + if(i+j==n) and not(i==j): + a.append((i,j)) + return list(set(tuple(sorted(l)) for l in a)) diff --git a/pair_sum.pyc b/pair_sum.pyc new file mode 100644 index 0000000..e4f1165 Binary files /dev/null and b/pair_sum.pyc differ diff --git a/tests/__init__.pyc b/tests/__init__.pyc new file mode 100644 index 0000000..6492d1a Binary files /dev/null and b/tests/__init__.pyc differ diff --git a/tests/test_pairSum.pyc b/tests/test_pairSum.pyc new file mode 100644 index 0000000..448ffc5 Binary files /dev/null and b/tests/test_pairSum.pyc differ