List in Python

Source code :

mylist=['hai','this','is','an','list']
print(mylist)
mylist.append('simple')
print(mylist)
mylist.extend(['tutorial','program'])
print(mylist)

Output :

['hai', 'this', 'is', 'an', 'list']
['hai', 'this', 'is', 'an', 'list', 'simple']
['hai', 'this', 'is', 'an', 'list', 'simple', 'tutorial', 'program']

Output :


                

Comments :