Q. What would be the output of following code?


total = 0
mydict = {"cat":12, "dog": 6, "elephant":23,"bear":20}
for akey in mydict:
    if len(akey) > 3:
        total = total + mydict[akey]
print(total)


Answer :-


Output :-


43
>>>

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post