May-23-2017, 02:11 PM
test case is using xrange. that is strictly python 2 and returns generator, while range returns list. In python 3 range returns generator and xrange is not available
your function should be called list_length and must take instance of SingleMethodList class. That's why you need to create the instance outside the function and pass it as argument. Using your own algorithm list_length should return the len of the list. However at the moment it just prints some info and at the end always return None (i.e. 'the default' return value from a function). If it remain so, test case will fail always.
your function should be called list_length and must take instance of SingleMethodList class. That's why you need to create the instance outside the function and pass it as argument. Using your own algorithm list_length should return the len of the list. However at the moment it just prints some info and at the end always return None (i.e. 'the default' return value from a function). If it remain so, test case will fail always.