How do you append to a list in python?



How do you append to a list in python?..

Answer / Divya Sharma

In Python, you can append an element to a list using the 'append()' method. For example: myList = ['apple', 'banana', 'cherry']; myList.append('date'); will result in myList = ['apple', 'banana', 'cherry', 'date'].

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is tuple?

1 Answers  


Explain how python does compile-time and run-time code checking?

1 Answers  


Why c++ is faster than python?

1 Answers  


Define the usage of split?

1 Answers  


How do you exit a python script?

1 Answers  


What are python slots?

1 Answers  


What does it mean when pandas form a group?

2 Answers  


What is pip command in python?

1 Answers  


Is python a pop or oop?

1 Answers  


Can we learn python in a week?

1 Answers  


What is the purpose of self?

1 Answers  


What are python packages?

1 Answers  


Categories