我主要使用 Python3。我可以写这个吗
print(f"the answer is {21 + 21} !")
输出:答案是 42 !但在 Python 2 中 f 字符串不存在。那么这是最好的方法吗?
print("the answer is " + str(21 + 21) + "!")
慕村9548890
倚天杖
DIEA
相关分类