Lists are mutative so that we can change the list with the help of operators and methods.
Lists are mutable or changeable, meaning their elements can be changed. We can use the assignment operator (=) to change an item or several items.
We can add one item to a list using the append() method and add a range of items using extend() method.
We can also use the plus operator(+) to combine two lists which are also called concatenation. The star operator(*) repeats a list for the given number of times mentioned.
We can even add one item to a list using the append() method or can add a range of items using extend() method.
We can also use the plus operator(+) to combine two lists which are also called concatenation. The star operator(*) repeats a list for the given number of times mentioned.
['knoweldge2life 1', 'knoweldge2life 2', 'knoweldge2life 3', 'knoweldge2life 4']
['knowedge2life']
['knowedge2life', 'online website']
|