Answer to Question #134719 in Python for santosh kasyap

Question #134719
1. What is the value of endmsg after executing the following lines?

startmsg = "python"
endmsg = ""
for i in range(1,1+len(startmsg)):
endmsg = startmsg[-i] + endmsg

2.What is the value of mylist after the following lines are executed?

def mystery(l):
l = l[1:]
return()

mylist = [7,11,13]
mystery(mylist)
1
Expert's answer
2020-09-23T11:28:06-0400
  1. The value of endmsg after executing the code is: "python"
  2.  The value of mylist after the code executed is: [7, 11, 13]

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