पायथन सूची निकालें () विधि
उदाहरण
सूची का "केला" तत्व निकालें fruit
:
fruits = ['apple', 'banana', 'cherry']
fruits.remove("banana")
परिभाषा और उपयोग
विधि निर्दिष्ट मान के साथ तत्व की remove()
पहली घटना को हटा देती है।
वाक्य - विन्यास
list.remove(elmnt)
पैरामीटर मान
Parameter | Description |
---|---|
elmnt | Required. Any type (string, number, list etc.) The element you want to remove |