T

Tanmay • 2.43K Points
Master

Q. Suppose we have a = [1,2,3,4,5], which of the following statements is correct?

  • (A) print(a[:100]) #Print [1,2,3,4,5] ?
  • (B) print(a[:]) #Print [1,2,3,4] ?
  • (C) print(a[0:]) #Print [2,3,4,5] ?
  • (D) print(a[-1:]) #Print [1,2] ?
  • Correct Answer - Option(A)
  • Views: 119
  • Filed under category Python

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics