QuestionQ27

Data Serialization

Given the following Python script:

a = [1,2,3,4,5,6,7,8,9]  
print(a[0])  

What does this print command output?

  • A 1
  • B 2
  • C 7
  • D 9
Explanation

Python list indexing begins at 0, making a[0] the first list element, 1.

Community Discussion

No comments yet. Be the first to start the discussion!