Light Mode
Dark Mode
Wrong test input?

Hello there,

I am solving "Min and Max" mission and I am getting TypeError (: 'generator' object is not subscriptable, min, 4, , 9). I tried running my solution in PyCharm and called min(abs(i) for i in range(-10, 10)) as the test is suggesting. I got the same error there unless you wrap for instruction with [], as I was thought to make an iterable.

Firstly I thought it was input bug but in Discussions here it stroke me it may have not. I found something called 'generator' sb had mentioned but I have not gather any info about those yet.

Is it just a bug or not, in the mission description in "input" section we have: "One positional argument as an iterable or two or more positional arguments. Optional keyword argument as a function." I do not know for sure, but I guess 'generator' is not either.

Cheers,

Kaju

Created: Nov. 26, 2015, 10:08 p.m.
Updated: Nov. 26, 2015, 10:32 p.m.
0
11
User avatar
k4ju