output format

I have noticed that for some of the advanced exercises the ‘automatic assessor’ expects the format of the result to be in a given shape or type.

With exercise 16, the algorithm I used gave the answer as a list [1, 0] when run but submitting this to the ‘Test’ gives an error

assertion failed [1, 0] ≠[1 0]

Nowhere in the exercise is the output format specified. I got the test to pass by converting my list [0, 1] to a pure string using the list conversion commands:

y.append(x) # the end of my algorithm giving a boolean list as its answer in list y

I needed to add

items_str = [str(item) for item in y]
y_output = "[" + " ".join(items_str) + "]" # [0,1] becomes [0 1]

this removed the 'testing error' but did not change the underlying algorithm for calculating the answer