python过长数据换行通用什么方法,python过长换行通用,我尝试sql发现里面会保


我尝试'''sql'''发现里面会保留换行回车符,通行的做法是什么?

# python解释器会自动连接相邻字符串,加上括号,可去掉不必要的换行符# 示例代码如下:sql = (    "select id, email, created_at from user"    " where email like '%@gmail.com'"    " order by created_at desc")cursor.execute(sql)

或者

sql = "select "\      "from"\      "where"

其实保留回车也没有什么的,至少SQLAlchemy里一抓一大把

编橙之家文章,

评论关闭