Python List Add Presentation


This is the presentation associated with the python list add video.

Download Presentation

Python List Add Video Question

This is the Question that was asked in the python list add video

Question : What is the output of the following code:
In [ ]:
namelist = ["Bill", "Steve", "Tim"]
namelist2 = {1:"Tom", 2: "James"}

namelist.extend(namelist2)
print(namelist)
In [1]:
namelist = ["Bill", "Steve", "Tim"]
namelist2 = {1:"Tom", 2: "James"}

namelist.extend(namelist2)
print(namelist)
['Bill', 'Steve', 'Tim', 1, 2]