On This Page

This set of Problem Solving and Python Programming Multiple Choice Questions & Answers (MCQs) focuses on Problem Solving And Python Programming Set 12

Q1 | Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?
Q2 | >>>print(names[-1][-1])
Q3 | print sum
Q4 | Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:
Q5 | >>>list1 < list2 is
Q6 | To add a new element to a list we use which command?
Q7 | To insert 5 to the third position in list1, we use which command?
Q8 | To remove string “hello” from list1, we use which command?
Q9 | Suppose list1 is [3, 4, 5, 20, 5], what is list1.index(5)?
Q10 | Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5)?
Q11 | Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?
Q12 | , 5])?
Q13 | >>>"Welcome to Python".split()
Q14 | >>>list("a#b#c#d".split('#'))
Q15 | >>>print(indexOfMax)
Q16 | print(myList[i], end = " ")
Q17 | >>>print(list2)
Q18 | print(v)
Q19 | print(v)
Q20 | print(2)
Q21 | print(names2[2][0])
Q22 | numbers = [1, 2, 3, 4]numbers.append([5,6,7,8])print(len(numbers))
Q23 | To which of the following the “in” operator can be used to check if an item is in it?
Q24 | print(len(list1 + list2))
Q25 | print(len(mylist))