There is a variable x in python script, I wanna send the value of x by email. My code is
s=smtplib.SMTP('locaolhost')
s.sendmail(FROM, TO, "the answer is x")
But I always got the message the answer is x instead of x being the real value. How to solve this?
You first convert the value of
xinto string bystr(x), then appendstr(x)to the end of the string"the answer is "by+.