x=[1,2,3] x.extend(\'a\')
Output:
x is [1,2,3,\'a\']
But when I do the following:
[1,2,3].extend(\'a\
extend will extend list it self. Return type of that method is None
extend
None
If you want to union 2 list and add that list to another list then you have to use another way to add.
union
listB[15:18] = listC[3:12] listA.extend(listB)