So the problem I am having, and now i have followed what everyone is saying, is that it is passing None to the function, so after testing, I get on all but the empty list test in my test suite
Have I not converted everything to python3 correctly?
Ah, I have a break through, thank you all for your help, I changed the range x was working on to 0, and another test was passed, it now only fails on an empty list and single item list which is what I was expecting it to do, as I had not written the code to deal with that yet. Thank you very much for your help. I think I nearly get it now.
Unbound error variable 'first' referenced before assignmentWhich implies to me that it is completely missing tie if statements which I don't understand. when i run my original code, it does what I expect, yet take it out of the function and pass it to the function, and it all falls apart.
Have I not converted everything to python3 correctly?
Ah, I have a break through, thank you all for your help, I changed the range x was working on to 0, and another test was passed, it now only fails on an empty list and single item list which is what I was expecting it to do, as I had not written the code to deal with that yet. Thank you very much for your help. I think I nearly get it now.