Skip to content Skip to sidebar Skip to footer

Valueerror : Not Enough Values To Unpack. Why?

I am learning file management from a website and I tried executing a certain script but it hasn't worked out well for me. It keeps returning this error at the line : city, day, ti

Solution 1:

You need an if condition which will allow you to skip over blank lines. Something like:

if not line:
   continue

# Or do this

if not line:
   pass
else:
   *city, day, time = line.split()

Post a Comment for "Valueerror : Not Enough Values To Unpack. Why?"