single element adding by using append method
l=[]
l.append(10)
print(l)
output:
[10]
multiple methods adding by using append method
l=[]
l.append(10)
l.append(20)
l.append(30)
l.append(40)
print(l)
output:
[10, 20, 30, 40]
l=[]
l.append(10)
print(l)
output:
[10]
multiple methods adding by using append method
l=[]
l.append(10)
l.append(20)
l.append(30)
l.append(40)
print(l)
output:
[10, 20, 30, 40]
No comments:
Post a Comment