Game Preview

Lists in Python

  •  English    7     Public
    Identify the concept of lists to represent and manipulate data structures in a Python program
  •   Study   Slideshow
  • Which of the following is the best description of a list in Python?
    a) A list is a collection of data that has an order and can be changed
  •  10
  • Which of the following commands will return the length of the list mylist?
    B) len(mylist)
  •  10
  • What output will this code produce?
    red
  •  10
  • What is the index number for 'Spain'?
    2
  •  10
  • _______________ method can be used to add an element at a specified index in a list.
    insert
  •  10
  • ________________ method adds a single item to the end of the list.
    append
  •  10
  • What will be the output of the following code segment?
    4
  •  10