Study

Lists in Python - Activity#1

  •   0%
  •  0     0     0

  • What is the output of the following segment?
    ["C"]
  • ___________________ method adds a single element to the end of the list.
    append( )
  • How do you get the length of the list grades? grades = [2.0, 3.0, 4.0]
    len(grades)
  • ____________________ method can be used to add an element at a specified index/location in a list.
    insert( )
  • What is numbers [-3]? numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    8
  • Write the Python code that changes the 4th element in list numbers to 9.
    numbers[3] = 9