SarkariResultess QA Bank

Python में list से आखिरी item हटाने के लिए क्या करें? — error आने पर developer क्या करे?

Other 0 Views Verified
Python में list से आखिरी item हटाने के लिए क्या करें? — error आने पर developer क्या करे?
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified Correct Answer

items.pop()

items.pop()
Additional Explanation
pop() बिना index के आखिरी item हटाता और लौटाता है। पहले traceback की exact line और input value check करें।
Verified

items.shift()

items.shift()
Additional Explanation
यह विकल्प सही समाधान नहीं है।
Verified

items.remove_last()

items.remove_last()
Additional Explanation
यह विकल्प सही समाधान नहीं है।
Verified

items.delete()

items.delete()
Additional Explanation
यह विकल्प सही समाधान नहीं है।