Study

Lists in Python

  •   0%
  •  0     0     0

  • Which of the following commands will return the length of the list mylist?
    B) len(mylist)
  • What output will this code produce?
    red
  • ________________ method adds a single item to the end of the list.
    append
  • What will be the output of the following code segment?
    4
  • What is the index number for 'Spain'?
    2
  • 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
  • _______________ method can be used to add an element at a specified index in a list.
    insert