I am facing a problem with the following error message in python.
ValueError: not enough values to unpack (expected at least 2, got 1)
a code line with the above error is
op, param, *val = statement.split()
I tried to find where a line has only one at least not 2 using print value. But there are so many lines so I can't find it.
Do you know how to find a line with the problem easier?
or you can just print all the statements and some other information like the length of the list and maybe the split list also.. its easier to know exactly what is wrong.
print(statement)
l = statement.split()
print(l)
print("len : ", len(l))
op, param, *val = l