A

Admin • 832.27K Points
Coach

Q. Which of these is the correct syntax to access the first element of a list named `my_list`?

  • (A) my_list(0)
  • (B) my_list[0]
  • (C) my_list{0}
  • (D) my_list<0>
  • Correct Answer - Option(B)
  • Views: 20
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

List indexing is done using square brackets.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.