What is the difference between python append () and extend () functions?



What is the difference between python append () and extend () functions?..

Answer / Suneel Dutta

The `append()` function adds a single element to the end of a list, while the `extend()` function takes an iterable (like another list) and appends all its elements to the end of the list.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

Is java better than python?

1 Answers  


What are private methods in python?

1 Answers  


How do you sort a dataframe in descending order?

1 Answers  


What is metaprogramming in Python?

1 Answers  


What are docstrings and comments?

1 Answers  


Explain accessor and mutator methods in python?

1 Answers  


What is an interpreter for python?

1 Answers  


Python read a single character from the user?

1 Answers  


How do we interpret Python?

2 Answers  


Explain list, tuple, set, and dictionary and provide at least one instance where each of these collection types can be used.

1 Answers  


What is the best Django or PHP?

1 Answers  


Why do we want to use break statement in while-loop?

1 Answers  


Categories