0% found this document useful (0 votes)
144 views7 pages

List Manipulation in Python Class 11 MCQs

The document contains multiple-choice questions (MCQs) related to list manipulation in Python, targeting Class 11 students. It covers various aspects of lists, including their properties, operations, and methods. The questions test knowledge on list creation, data types, indexing, and built-in functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views7 pages

List Manipulation in Python Class 11 MCQs

The document contains multiple-choice questions (MCQs) related to list manipulation in Python, targeting Class 11 students. It covers various aspects of lists, including their properties, operations, and methods. The questions test knowledge on list creation, data types, indexing, and built-in functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

List Manipulation in Python Class 11 MCQs

1. The data type list is an ordered sequence which is ________ and made up of one or more
elements.
a. Mutable
b. Immutable
c. Both a) and b)
d. None of the above

2. Which statement from the list below will create a new list?
a. new_l = [1, 2, 3, 4]
b. new_l = list()
c. Both a) and b)
d. None of the above

3. List can contain __________.


a. Integer
b. Float
c. String & Tuple
d. All of the above

4. list are enclosed in square ________ and are separated by _________.


a. Brackets and comma
b. Brackets and dot
c. Curli Brackets and dot
d. None of the above

5. List elements may be of the following data types.


a. Different data types
b. Same data types
c. Both a) and b)
d. None of the above

6. In Python, lists are mutable. It means that ________.


a. The contents of the list can be changed after it has been created
b. The contents of the list can’t changed after it has been created
c. The list cannot store the number data type.
d. None of the above

7. What will be the output of the following python code

print(list("Python"))

a. (‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’)


b. [‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’]
c. (“P”, “y”, “t”, “h”, “o”, “n”)
d. [“P”, “y”, “t”, “h”, “o”, “n”]
8. The data type list allows manipulation of its contents through ________.
a. Concatenation
b. Repetition
c. Membership
d. All of the above

9. Python allows us to join two or more lists using __________ operator.


a. Concatenation
b. Repetition
c. Membership
d. All of the above

10. What will be the output of the following python code

new_list = ['P','y','t','h','o','n']

print(len(new_list))

a. 6
b. 7
c. 8
d. 9

11. Example of concatenation operator _______.


a. –
b. +
c. /
d. *

12. If we try to concatenate a list with elements of some other data type, _________ occurs.
a. Runtime Error
b. Type Error
c. Result
d. None of the above

13. Python allows us to replicate a list using replication operator depicted by symbol
_________.
a. –
b. +
c. /
d. *
14. Like strings, the membership operators _________ checks if the element is present in the
list and returns True, else returns False.
a. in
b. out
c. listin
d. None of the above

15. We can access each element of the list or traverse a list using a _______.
a. for loop
b. while loop
c. Both a) and b)
d. None of the above

16. _________ returns the length of the list passed as the argument.
a. len()
b. length()
c. leth()
d. None of the above

17. ________ creates an empty list if no argument is passed.


a. len()
b. list()
c. append()
d. extend()

18. ________ adds a single element passed as an argument at the end of the list.
a. append()
b. extend()
c. insert()
d. None of the above

19. Which of the following command is used to add an element in list?


a. new_list.add(5)
b. new_list.added(5)
c. new_list.append(5)
d. All of the above
20. _________ returns the number of times a given element appears in the list.
a. insert()
b. index()
c. count()
d. None of the above

21. _________ returns index of the first occurrence of the element in the list. If the element
is not present, ValueError is generated.
a. insert()
b. index()
c. count()
d. None of the above

22. What will be the output of the following python code.

new_list1 = ["Welcome"]

new_list2 = ["to", "my"]

new_list3 = ["School"]

print(new_list1 + new_list2 + new_list3)

a. [‘Welcome’, ‘to’, ‘my’, ‘School’]


b. [‘Welcome’]
c. [‘Welcome’, ‘to’, ‘my’]
d. None of the above

23. ________ function removes the given element from the list. If the element is present
multiple times, only the first occurrence is removed.
a. delete()
b. rem()
c. remove()
d. None of the above

24. _______ function returns the element whose index is passed as parameter to this
function and also removes it from the list.
a. push()
b. remove()
c. pop()
d. None of the above
25. What will be the output of the following python code.

new_list = "1234"

print(list(new_list))

a. [‘1’, ‘2’, ‘3’, ‘4’]


b. (‘1’, ‘2’, ‘3’, ‘4’)
c. {‘1’, ‘2’, ‘3’, ‘4’}
d. None of the above

26. What will be the output of the following python code.

new_list = "1234"

new_list = list(new_list)

print(type(new_list[2]))

a. Erron
b. class ‘str’
c. class ‘int’
d. None of the above

27. When a list appears as an element of another list, it is called a ________.


a. New list
b. Nested list
c. Multi List
d. None of the above

28. What will be the output of the following python code.

new_list = [1, 2, 3, 4, [5, 6, 7]]

print(new_list[6])

a. 4
b. list index out of range
c. 6
d. 7
29. What will be the output of the following python code.

new_list = ["Welcome", "to", "my", "School"]

print(new_list[-2][-2])

a. W
b. y
c. m
d. S

30. Which of the following is not a list operation?


a. Slicing
b. Replication
c. Concatenation
d. Dividing

31. What will be the output of the following python code.

new_list = ["Welcome", "to", "my", "School"]

print(new_list*2)

a. [‘Welcome’, ‘to’, ‘my’, ‘School’, ‘Welcome’, ‘to’, ‘my’, ‘School’]


b. [‘Welcome’, ‘to’, ‘my’, ‘School’]
c. [‘Welcome’]
d. None of the above

32. What will be the output of the following python code.

new_list = ("Welcome to my School")

print(new_list[14 : -1])

a. School
b. Welcome
c. Schoo
d. None of the above

33. What will be the output of the following python code.

new_list = [5, 8, 3]

new_list1 = [1, 2, 3]

print(new_list.append(new_list1))

a. [5, 8, 3, 1, 2, 3]
b. [1, 2, 3, 5, 8, 3]
c. None
d. None of the above
34. Which of the subsequent results in an empty list?
a. new_list = list(0)
b. new_list = list()
c. new_list = list(empty)
d. All of the above

35. Given my_list = ['a', 'b', 'c', 'd', 'e'], what is the output of my_list[1:4]?

a. ['a', 'b', 'c']


b. ['b', 'c', 'd']
c. ['b', 'c', 'd', 'e']
d. ['a', 'b', 'c', 'd']

You might also like