What is append statement | How To | Use append statement | Python Program

__.append("____")

print(___)                     #Append statement
Append statement is use in python language to insert a constant at end .
For example:
abc=["..........."]
abc.append("name")
print(abc)

abc considered as a array, append is used to insert "name" at end.

Code:

list=["Bread","Milk","Tea","Noodles","Butter","Suger"]

for item in list:

    print(item)

list.append("water")

print(list)


Output:

 


Popular posts from this blog

TOP 10 PROGRAMMING LANGAUAGES COMMING 2021 | ARTICLE

Write a C-program to swap two number:

Print Fibonacci Series using Recursion | C program :