Question #294168

Janhvi is studying about the python list . She is facing the problem to predict the output



of following python code




1




lst1 = [10, 15, 20, 25, 30]



lst1.insert( 3, 4)



lst1.insert( 2, 3)



print (lst1[-5]

Expert's answer

Output:

 SyntaxError: unexpected EOF while parsing
  • she will get the above syntax error since she has not put the closing bracket of the print function. If she can correct the error by putting the closing bracket she will get 3 as the output
LATEST TUTORIALS
APPROVED BY CLIENTS