Passing a range into a function passes with incorrect solution


The problem asks you to return [0, 1, 2] however if you use print my_function(range(0,3)) then you will return [0, 2, 4] and the lesson will pass. I really want to upgrade to premium but the Python lessons are so broken I’m not sure it is worthwhile.


Please remember to include a link to the exercise when posting a question in the Q&A. Thanks.



On line 6, replace the ____ with a range() that returns a list containing [0, 1, 2]

my_function should return [0, 2, 4], as expected. The above refers to the range function returning a list [0, 1, 2].



my_function(range(0, 3))


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.