diff --git a/week4/community-contributions/hopeogbons/python sample.py b/week4/community-contributions/hopeogbons/python sample.py new file mode 100644 index 0000000..ba61e9c --- /dev/null +++ b/week4/community-contributions/hopeogbons/python sample.py @@ -0,0 +1,9 @@ +# Python Function + +# This function takes a list of items and returns all possible pairs of items +def all_pairs(items): + pairs = [] + for i in range(len(items)): + for j in range(i + 1, len(items)): + pairs.append((items[i], items[j])) + return pairs \ No newline at end of file