English

What will be the output of the following code? L = ["India", "Incredible", "Bharat"]print(L[1][0] + L[2][−1]) - Computer Science (Python)

Advertisements
Advertisements

Question

What will be the output of the following code?

L = ["India", "Incredible", "Bharat"]
print(L[1][0] + L[2][−1])

Options

  • IT

  • it

  • It

  • iT

MCQ
Advertisements

Solution

It

Explanation:

L[1][0] gives the first letter of "Incredible"'I'
L[2][-1] gives the last letter of "Bharat"'t'
Combining them → 'I' + 't' = "It"

shaalaa.com
  Is there an error in this question or solution?
2025-2026 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×