摘要:
###参考链接 #代码块 def dict_factory(cursor, row): d = {} for idx, col in enumerate(cursor.description): d[col[0]] = row[idx] return d con = sqlite3.connect( 阅读全文
摘要:
1.启动时遇到urls must start with a leading slash报错 解决方法 from flask import render_template @app.route('/hello/') # 注意这里网页前有/ @app.route('/hello/<name>') def 阅读全文
摘要:
字符串前加 f import time t0 = time.time() time.sleep(1) name = 'processing' # 以 f开头表示在字符串内支持大括号内的python 表达式 print(f'{name} done in {time.time() - t0:.2f} s 阅读全文