PYTHON Lists MCQ

Python MCQ
  1. Home
  2. Tutorials
  3. Python
  4. Lists
  5. Multiple Choice Question

(1) To delete all list items in python which function is used?

A) empty()
B) truncate()
C) clear()
D) delete()

(2) Count() method of list is used for ________

A) Count total element
B) Count item occurrence
C) Count index
D) None

(3) Which method of list is used to delete element in python?

A) remove()
B) delete()
C) fetch()
D) terminate()

(4) Which operator is used to split list items ?

A) : (Colon)
B) , (Comma)
C) . (Dot)
D) | (Pipe Sign)

(5) What is the last index of python list while using negative indexing?

A) N
B) 0
C) -1
D) 1

(6) Which of the following function is used to convert list items into string?

A) join()
B) concatenate()
C) toString()
D) string()

(7) _______ method is used to fetch and remove list items one after another from last.

A) get()
B) fetch()
C) pop()
D) print()

(8) Which function is used to count total no of elements in python list?

A) count()
B) length()
C) len
D) size()

(9) What is the index of first element in python lists?

A) 0
B) 1
C) 2
D) n

(10) In list declaration/initialization which of the following operator is used to separate values?

A) . (Dot)
B) , (Comma)
C) : (Colon)
D) ; (Semi Colon)

(11) Appen method of list in python add new value at which position?

A) First
B) Last
C) Specified index
D) at 1 index

(12) Python list can store which of the following data items?

A) Homogenous
B) Heterogeneous
C) Numeric
D) All of these

(13) Which of the following is correct syntax of empty list declaration in python

A) list()
B) list = []
C) list = create
D) create(list)
Comments
Login to TRACK of Comments.