0
Challenge Question Bug
nums = {1, 2, 3, 4, 5, 6} nums = {0, 1, 2, 3} & nums nums = filter(lambda x : x > 1, nums) print(len(list(nums))) Traceback (most recent call last): File "E:\python_codes\challenges.py", line 167, in <module> print(len(list(nums))) TypeError: 'list' object is not callable
3 Réponses
+ 2
How can that error message point at line 167? there barely 5 lines of code there.
Did you shadow the list() function (by using 'list' as variable name maybe) somewhere in the actual code?
+ 2
amirhs
What is bug here? Working fine
https://code.sololearn.com/cV9m59RsnXYZ/?ref=app
+ 1
Challenge Question Bug
num = {1, 2, 3, 4, 5, 6}
num2= {0, 1, 2, 3}
alist=num&num2
res =list( filter(lambda x : x > 1, alist))
print(len(res))