Answer to Question #294168 in Python for santosh

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]

1
Expert's answer
2022-02-05T02:03:38-0500

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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS