📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store

    • Question

      What will be the output of the following Python

      code: a=[1,2,3,4,5,6] print(a[-1],a[-1:],a[:-1])
      A [6] [6] [1,2,3,4,5,6] Correct Answer Incorrect Answer
      B 6 [6] [6,5,4,3,2,1] Correct Answer Incorrect Answer
      C 6 [6] [1,2,3,4,5] Correct Answer Incorrect Answer
      D 6 [6] [6,5,4,3,2] Correct Answer Incorrect Answer

      Solution

      The correct answer is C

      Practice Next
      More IT DBMS Questions
      ask-question