Write an algorithm to insert an element in to sorted list
Answers
Answered by
1
Answer:
Python - Inserting item in sorted list maintaining order
- Import the module bisect.
- Initialize list and element that need to insert.
- The module bisect has a method called insort that inserts an element into a list in an appropriate position. Use the method and insert the element.
- Print the list.
Explanation:
please mark as brainlist
Similar questions