There's a really strange problem with the HW7 test.
Let's take test_data_2:
Input: ' '.join(['1']*2)+' 2'
When I run a personal test (inside the if name == main thing), the output is {'2'} which is correct.
I enabled debug and printed on a text file all test outputs. When I check for the output of test_data_2 it gives me {'1', '2'}.
I also decided to print in the file, next to the output, the result of the condition:
s == ' '.join(['1']*2)+' 2'
Where s is the input. I did this to be sure that the input I copied from the test is the same tested when I ran the tests via pytest.
And next to my output there's True, so it's without any doubt the exact same input giving different output when ran via pytest on the terminal and when ran as personal test in my program. I also found out that some people in the past had my same problem (italian question), I don't know if it may be related.