帮助我不能让它工作,我试图将变量年龄放入字符串但它不会正确加载变量.
这是我的代码:
import random
import sys
import os
age = 17
print(age)
quote = "You are" age "years old!"
Run Code Online (Sandbox Code Playgroud)
给出了这个错误:
File "C:/Users/----/PycharmProjects/hellophyton/hellophyton.py", line 9
quote = "You are" age "years old!"
^
SyntaxError: invalid syntax
Process finished with exit code 1
Run Code Online (Sandbox Code Playgroud)