Q. Find the output of the following code:
a)
result=0
numberList=[10,20,30]
numberList.append(40)
result=result+numberList.pop()
result=result+numberList.pop()
print("Result=",result)
b)
answer=[]; output=''
answer.append('T')
answer.append('A')
answer.append('M')
ch=answer.pop()
output=output+ch
ch=answer.pop()
output=output+ch
ch=answer.pop()
output=output+ch
print("Result=",output)
Answer :-
a = Result= 70
b= Result= MAT
Thanku so. Much
ReplyDeleteWelcome 😊😊
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )