KnowledgeBoat Logo

Computer Science

Find the errors. Find the line numbers causing errors.

  1. S = "PURA VIDA"
  2. print(S[9] + S[9 : 15])

Python String Manipulation

14 Likes

Answer

The error is in line 2. Length of string S is 9 so its indexes range for 0 to 8. S[9] is causing error as we are trying to access out of bound index.

Answered By

7 Likes


Related Questions