Write positions(items, x) returning every index where x appears.
positions(items, x)
x
positions(['a', 'b', 'a'], 'a') → [0, 2]
positions([1, 2], 3) → []
Submit runs 4 tests, including hidden edge cases.
Run your code to see the output here.