python 编写代码中遇到问题汇总

1、python执行sql语句时报错:

ValueError: unsupported format character 'y' (0x79) at index 75

date_format(NOW(),'%y%m%d%h%m%s') sql语句中时间格式化%Y与python的参数%s冲突,
改成date_format(NOW(),'%%y%%m%%d%%h%%m%%s')
原文地址:https://www.cnblogs.com/xianhaiyan/p/15775302.html