代码: sql = """INSERT INTO video_info(video_id, title) VALUES("%s","%s")""" % (video_info["id"],video_info["title"]) 问题: pymysql.err.ProgrammingError: (1064, 'You have an error in your SQ…
数字 写在最前,必须要会的:int() 整型 Python3里无论数字多长都用int表示,Python2里有int和Long表示,Long表示长整型 有关数字的常用方法,方法调用后面都必须带括号() int():将字符串转换为整型,且字符串内容只能是数字 a = " b = "123a" c = int(a) d = int(b) # ValueError: invalid literal for int() with base 10: '123a' print(type(c…