# Reviews

  1. What are the data items in the list called?

    • data
    • elements
    • items
    • values
  2. Which list will be referenced by the variable number after the execution of the following code?

    number = range(0, 9, 2)
    • [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
    • [1, 3, 5, 7, 9]
    • [2, 4, 6, 8]
    • [0, 2, 4, 6, 8]
  3. What would you use if an element is to be removed from a specific index?

    • del statement
    • remove method
    • index method
    • slice method
  4. What is the first negative index in a list?

    • 0
    • -1
    • -0
    • Size of the string or list minus one
  5. What method can be used to place an item in the list at a specific index?

    • append
    • index
    • insert
    • Add
  6. What would be the value of the variable list after the execution of the following code?

    list = [1, 2]
    list = list * 3
    • [1, 2] * 3
    • [3, 6]
    • [1, 2, 1, 2, 1, 2]
    • [[1, 2], [1, 2], [1, 2]]
  7. What would be the value of the variable list after the execution of the following code?

    list = [1, 2, 3, 4]
    list[3] = 10
    • [1, 2, 3, 10]
    • [1, 2, 10, 4]
    • [1, 10, 10, 10]
    • invalid code
  8. What method or operator can be used to concatenate lists?

    • *
    • +
    • %
    • concat
  9. What would be the value of the variable list2 after the execution of the following code?

    list1 = [1, 2, 3]
    list2 = list1
    list1 = [4, 5, 6]
    • [1, 2, 3]
    • [4, 5, 6]
    • [1, 2, 3, 4, 5, 6]
    • invalid code
  10. What would be the value of the variable list2 after the execution of the following code?

    list1 = [1, 2, 3]
    list2 = []
    for element in list1
    	list2.append(element) 
    list1 = [4, 5, 6]
    • [1, 2, 3]
    • [4, 5, 6]
    • [1, 2, 3, 4, 5, 6]
    • invalid code
  11. When working with multiple sets of data, one would typically use a(n) .

    • list
    • tuple
    • nested list
    • Sequence
  12. The primary difference between a tuple and list is that .

    • when creating a tuple you don’t use commas to separate elements
    • a tuple can only include string elements
    • a tuple cannot include lists as elements
    • once a tuple is created, it cannot be changed
  13. What is the advantage of using tuples over lists?

    • Tuples are not limited in size.
    • Tuples can include any data type as an element.
    • Processing a tuple is faster than processing a list.
    • There is no advantage.
  14. What method can be used to convert a list to a tuple?

    • append
    • tuple
    • insert
    • list
  15. What method can be used to convert a tuple to a list?

    • append
    • tuple
    • insert
    • list