Top 1000+ Solved Problem Solving and Python Programming MCQ Questions Answer

From 496 to 510 of 820

Q. Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?

a. [3, 4, 5, 20, 5, 25, 1, 3]

b. [1, 3, 3, 4, 5, 5, 20, 25]

c. [25, 20, 5, 5, 4, 3, 3, 1]

d. [3, 1, 25, 5, 20, 5, 4, 3]

  • d. [3, 1, 25, 5, 20, 5, 4, 3]

Q. , 5])?

a. [3, 4, 5, 20, 5, 25, 1, 3, 34, 5]

b. [1, 3, 3, 4, 5, 5, 20, 25, 34, 5]

c. [25, 20, 5, 5, 4, 3, 3, 1, 34, 5]

d. [1, 3, 4, 5, 20, 5, 25, 3, 34, 5]

  • a. [3, 4, 5, 20, 5, 25, 1, 3, 34, 5]

Q. >>>"Welcome to Python".split()

a. [“welcome”, “to”, “python”]

b. (“welcome”, “to”, “python”)

c. {“welcome”, “to”, “python”}

d. “welcome”, “to”, “python”

  • a. [“welcome”, “to”, “python”]

Q. >>>list("a#b#c#d".split('#'))

a. [‘a’, ‘b’, ‘c’, ‘d’]

b. [‘a b c d’] c) [‘a#b#c#d’]

  • a. [‘a’, ‘b’, ‘c’, ‘d’]

Q. >>>print(indexOfMax)

a. 1

b. 2

c. 3

d. 4

Q. print(myList[i], end = " ")

a. 2 3 4 5 6 1

b. 6 1 2 3 4 5

c. 2 3 4 5 6 6

d. 1 1 2 3 4 5

  • c. 2 3 4 5 6 6

Q. >>>print(list2)

a. [1, 3]

b. [4, 3]

c. [1, 4]

d. [1, 3, 4]

  • b. [4, 3]

Q. print(v)

a. [1, 44]

b. [1, 2, 3, 44]

c. [44, 2, 3]

d. [1, 2, 3]

  • c. [44, 2, 3]

Q. print(v)

a. [1] [2] [3]

b. [1] [1, 2] [1, 2, 3]

c. [1, 2, 3]

d. 1 2 3

  • c. [1, 2, 3]

Q. print(2)

a. none

b. 1

c. 2

d. error

Q. print(names2[2][0])

a. none

b. a

c. b

d. c

Q. print(len(numbers))

a. 4

b. 5

c. 8

d. 12

Q. To which of the following the “in” operator can be used to check if an item is in it?

a. lists

b. dictionary

c. set

d. all of the mentioned

  • d. all of the mentioned

Q. print(len(list1 + list2))

a. 2

b. 4

c. 5

d. 8

Q. print(len(mylist))

a. 1

b. 4

c. 5

d. 8

Subscribe Now

Get All Updates & News