QuestionQ73

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What is the expected output from the following code?

Question Image

Explanation

True division produces -0.5, and int(-0.5) truncates toward zero to 0. Index 0 selects the first list element, Peter.

Community Discussion

No comments yet. Be the first to start the discussion!