python - Need more than 3 values to unpack -


hello have code on python works on laptop try use on different laptop , not work. precise version of python use on new computer 2.7.6.

fichier.write('pw(p) = a*p**(-1.0)+b*p**(c)') pattern = r'-?\d+\.\d*' a,_,d,c = re.findall(pattern,b) fichier.write('\na = ') fichier.write(a) fichier.write('\nb = ') fichier.write(d) fichier.write('\nc = ') fichier.write(c) fichier.write('\n') fichier.write('pw(p) = ') fichier.write(b) 

and python told me :

a,_,d,c = re.findall(pattern,b) valueerror: need more 3 values unpack 

i think problem of syntax. me ?

the variable b equal string:

'pw(p) = a*p**(-1.0)+b*p**(c)' 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -