NEW
Font size
WorksheetsLists - MCQ1
Total questions: 10
Worksheet time: 7mins
If L=[35,2,12,29,15]. then after L.pop(2), the contents of the list will be
[35,12,29,15]
[35,2,29,15]
[35,2,12,29]
None of the above
If L=[35,2,12,29,15]. then after L.pop(), the contents of the list will be
[35,12,29,15]
[35,2,29,15]
[35,2,12,29]
None of the above
If L=[10,20,30,50,60], which methods can add the number 40 between 30 and 50?
L.append(40)
L.extend(40)
L.insert(3,40)
L.insert(40,3)
Which of these statements will delete the number 40 from the list L=[10,20,30,40,50,60,70]?
1) L.remove(40)
2) L.delete(40)
3) L.pop(3)
4)L.pop(4)
1 and 2
1 and 3
1 and 4
1 only
If L=[10,20,30,40,50], then L.append(60) gives
[10,20,30,40,50,60,70]
[10,20,30,40,50,[60,70]]
Error
None of the above
If L=[10,20,30,40,50,60,70], then which of these statements would delete the elements 40,50,and 60?
L.delete([40,50,60])
del L[40,50,60]
del L[3:6]
L.delete[3:6]
In the following questions, a statement (A) of Assertion and another statement (R) of reasoning are given. Choose your answers as per the following
a) A and R are True and R is the right reasoning for the statement A
b) A and R are True, but R is not the correct reasoning for A
c) A is True, but R is False
d) A is False, but R is True
Statement
A) The values entered in a list can be edited later.
R) List is a data structure which can include values of multiple data types.
a
b
c
d
In the following questions, a statement (A) of Assertion and another statement (R) of reasoning are given. Choose your answers as per the following
a) A and R are True and R is the right reasoning for the statement A
b) A and R are True, but R is not the correct reasoning for A
c) A is True, but R is False
d) A is False, but R is True
Statement
A) In the pop () method, the argument is optional..
R) If no argument is given, it removes the last element
a
b
c
d
In the following questions, a statement (A) of Assertion and another statement (R) of reasoning are given. Choose your answers as per the following
a) A and R are True and R is the right reasoning for the statement A
b) A and R are True, but R is not the correct reasoning for A
c) A is True, but R is False
d) Both A and R are False
Statement
A) In the remove () method, the argument is optional..
R) If no argument is given, it removes the last element
a
b
c
d
In the following questions, a statement (A) of Assertion and another statement (R) of reasoning are given. Choose your answers as per the following
a) A and R are True and R is the right reasoning for the statement A
b) A and R are True, but R is not the correct reasoning for A
c) A is True, but R is False
d) Both A and R are False
Statement
A) In a list, the last element has index -1
R) Lists do not support negative indexing
a
b
c
d
