values (%s, %s, %d, %d, %d)" %tuple(chat_item)
如果chat_item是list必須先把list轉換爲tuple之後,才能格式化。
values (%s, %s, %d, %d, %d)" %tuple(chat_item)
如果chat_item是list必須先把list轉換爲tuple之後,才能格式化。
1.while循環的格式 while 條件: 條件滿足時,做的事情1 條件滿足時,做的事情2 條件滿足時,做的事情3 ...(省略)... demo