You missed a +
symbol:
regex = '<span id="yfs_184_'+symbolslist[i]'">(.+?)</span>'
^
|
here---------------------------------------
2
solved there is an error in your program invalid syntax python 2.7.15