from flask import Flask #导入
app = Flask(__name__)
@app.route('/')
def index():
res=" " #创建
for i in range(1,10):
for j in range(1,i+1):
res=res + ("%d*%d=%-2d"%(j,i,i*j)) +" "*4
return res
if __name__ == '__main__':
app.run() #输出
2024-01-15 21:22:22
from flask import Flask #导入
app = Flask(__name__)
@app.route('/')
def index():
res=" " #创建
for i in range(1,10):
for j in range(1,i+1):
res=res + ("%d*%d=%-2d"%(j,i,i*j)) +" "*4
return res
if __name__ == '__main__':
app.run() #输出