Game Preview

Lists in Python - Activity#3

  •  English    5     Public
    Identify the concept of Lists to represent and manipulate data structures in a Python program.
  •   Study   Slideshow
  • What is the output of the following list assignment?
    False
  •  10
  • Write the Python code that can sort list numbers = [1, 4, 2, 6, 3 ]
    numbers.sort()
  •  10
  • Using the slicing concept, write the line of code that would display elements [4, 5, 6] only.
    numbers[3:6]
  •  10
  • What is output of the above code segment?
    True
  •  10
  • What is the output of the above code segment?
    [7, 5, 2, 8]
  •  10