What is the output of the following code ?
>>> s = [45 ,78, 25] >>> s.extend((56, )) >>> s
[45, 78, 25, [56]]
[45, 78, 25]
[45, 78, 25, 56]
Error - can not use tuple for extend
s.extend() takes any iterable and adds to the list.
So the result will be [45, 78, 25, 56]
Comment here: