[Solved] Python, append() and NoneType, no slice: is there a hack around it, if there is which is preferred(append or +)?
I tried to use append() on a list only to realize I couldn't slice it because it was none type. I thought append only altered the list content. I am bewildered by what I did wrong because I wasn't able to print it even, after appending it. So I did a search, saw on StackOverflow that list + list was better, kept the list pure and all. Is that really a general statement of truth? What are your opinions on it? When do you refrain from using +, I mean, is there a situation where append is better? I might need to review my previous assignments depending on what you say. Thank you. I was doing a base conversion exercise. Here you can see how I had to use +. I cannot even tell if I forgot doing something with append that I used to do in my earlier exercises. I could also use some advice on concise and precise commenting. I suck at it. https://code.sololearn.com/c9l8zpAzr0VE/?ref=app