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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -