Currently I am doing Generator’s objective in which I found difficulty in solving it.
Here I am getting error like this:
Traceback (most recent call last):
File “script.py”, line 18, in
File “script.py”, line 6, in read_guestlist
if len(line_data) < 2:
TypeError: object of type ‘NoneType’ has no len()
Another thing I found out that every next(r1) call the value from file and a None value why?
Here is my code:
Can Anyone help me out in how to solve this error?