Use case:
I want to append a new item along with all the existing items in a list to the same list.
Ex:
list = [ 'a', 'b', 'c']
Appending 'd'
, expecting the output as: ['a', 'b', 'c', 'a', 'b', 'c', 'd']
My code:
list.append(list.append('d'))
Current output:
['a', 'b', 'c', 'd', None]
Why am I getting a None
item here and how can I print the list as expected?