I'm new to this, hope someone can help with my basic question to help clarify my concept.
I was playing around to shorten the code, but the 2nd case didn't work.
I think it didn't work because remove() doesn't return anything. Is that correct?
This got me wondering. When do you want write function that doesn't return anything? Isn't it always good to return something even though it might be get used? How do you work with function that doesn't return anything.
s = 'abc'
# This remove a from the abc
x = list(s)
x.remove('a')
# if remove() can return the list this would be simpler
x = list(s).remove('a')