x=[1,2,3,4,5]
x.append(20) # number '20' is added in the end of list
print "After adding '20' to the list,x=",x
print""
DipankarChoudhury = ['hack','defence','security','hack']
y=DipankarChoudhury.count('hack')
print "No of times the word 'hack' present in the list :",y
print""
z=DipankarChoudhury.count('security')
print "No of times the word 'hack' present in the list :",z
print""
print "Good Night And Have a Sweet Dream"
x.append(20) # number '20' is added in the end of list
print "After adding '20' to the list,x=",x
print""
DipankarChoudhury = ['hack','defence','security','hack']
y=DipankarChoudhury.count('hack')
print "No of times the word 'hack' present in the list :",y
print""
z=DipankarChoudhury.count('security')
print "No of times the word 'hack' present in the list :",z
print""
print "Good Night And Have a Sweet Dream"
No comments:
Post a Comment