from z3 import *
x = Int('x')
y = Int('y')
s = Solver()
try:
f = open("read.txt","r")
try:
str = f.read()
length = len(str)
s.add(str)
finally:
f.close()
except IOError:
pass
我写了上面的代码,但它不起作用。它没有将字符串作为输入,我无法找到它接受的输入类型。