这是我的代码:
for i, line in enumerate(searchlines):
b = 1.860572
if "%b" in line and "4.871899" in line and "1.995131" in line:
m.write("match" + "\n")
Run Code Online (Sandbox Code Playgroud)
我想将b变量放在我现在所拥有的位置'%b',所以它就像其他两个数字一样,但没有硬编码.谁知道怎么做?我还在学习Python.
python ×1