I am trying to extract four variables in a for loop using zip method().
for actual,pred,key,val in zip(actual,pred,dict.items()):
But I am getting an error saying that the zip returns only 3 values instead of four.
not enough values to unpack (expected 4, got 3)
What is wrong here ?
You pass 3 iterates to zip(). Therefore it will return 3 values. The value returned from _dict.items() will be a key/value tuple.
Here are two options: