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]
B 6 [6] [6,5,4,3,2,1]
C 6 [6] [1,2,3,4,5]
D 6 [6] [6,5,4,3,2]
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)