debug.py - 03:42:15
def find_bug():
for i in range(len(data)):
if data[i] == None: # <-- here?
print(f"found it: {i}")
return i
return -1
>>> find_bug()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in find_bug
TypeError: object of type 'NoneType' has no len()
>>> data = None # oh.
3:42 AM