QuestionQ78Verified/Miscellaneous (List Comprehensions, Lambdas, Closures, I/O)Copy linkReport a problemAsk AstroTutorSave questionWhat behavior is expected from the following code? AIt outputs [2, 4].BIt outputs [4, 2].CIt outputs [0, 1, 2, 3, 4].DThe code is erroneous and it will not execute.Show AnswerAnswerExplanationrange(5, 0, -1) produces the values 5 through 1 in descending order. Filtering those values for even numbers preserves their list order, producing [4, 2].Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion