Adding items to List in Python

Source code :

#prepare a list
names = ['jake', 'reshma', 'naren', 'ilango', 'gowtham']

print('My teammates are:', names)

#add new items to the list
names.append('dhinakaran')

print('My teammates are:', names)





Output :

My teammates are: ['jake', 'reshma', 'naren', 'ilango', 'gowtham']
My teammates are: ['jake', 'reshma', 'naren', 'ilango', 'gowtham', 'dhinakaran']

Output :


                

Comments :