Report Bug

QusThe pop() method of the array does which of the following task? Qusऐरे की पॉप () विधि निम्नलिखित में से कौन सा कार्य करती है?


A. decrements the total length by 1
B. increments the total length by 1
C. prints the first element but no effect on the length
D. updates the element


Solution
A. decrements the total length by 1



Explanation
pop() function pops out that is delete the last element from the array. Hence pop() method (it works with push()) reduces the length of an array by 1.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad