def manipulate_data(data):
if isinstance(data, (list, tuple, set)):
return [len([n for n in data if isinstance(n, int) and n >= 0]), sum(n for n in data if isinstance(n, int) and n < 0)]
return 0
when i input this code it says test_only_lists_allowed
Failure in line 11, in test_only_lists_allowed self.assertEqual(result, 'Only lists allowed', msg='Invalid argument') AssertionError: Invalid argument
Comments
Leave a comment