Skip to content Skip to sidebar Skip to footer

Python Function Returns None, Unclear Why

I am pretty new to python and am hitting an issue I cannot explain. I have tried searching through the forum answers here, but what I am finding does not match up with my situation

Solution 1:

I didn't study your code, but I'd say that it's for this line:

return lst.append([1,1])

list.append() always returns None.

So lst.append([1,1]) will append [1,1] to lst and return None.

Post a Comment for "Python Function Returns None, Unclear Why"