Understanding List is one of the most important thing for anyone who just started coding in Python. You may need to add an element to the list whether at the end or somewhere in between. Although it can be done manually with few lists of code, built in function come as a great time saver. There are 3 in-build method to add an element in a list. Beginners sometimes got… Read More »3 Methods to Add Elements to List in Python || Append vs Extend vs Insert methods of Python
python add to list
The insert() method inserts an element to the list at a given index. The index() method searches for an element in the list and returns its index. Syntax of Insert() Method list.insert(index, element) Insert() Parameters This method takes two parameter index where an element needs to be inserted element is the element to be inserted in the list. This method doesn’t return any value. It just insert an element at the given index.… Read More »Insert Method in Python