News
print (name) #accessing element using list index value print (name [3]) #printing element pratik print (name [4]) #printing element manisha #accessing element using negative indexing print (name [-5]) ...
Unlike pop (), it does not return the removed element, and it does not take an index as an argument. For example, if you want to remove the value "cherry" from the fruits list, you can use remove ...
If you only want to grab a random element from a list in Python, you can do this with the random package as well. Import the random package by including import random near the top of your code.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results