python中的转义符怎么实现

python中的转义符怎么实现

1.string.replace('\'', '\\\'')


2.%号转义符(用于Django程序编程中页面SQL)
where  t_stock.productbarcode ='%s'  and t_products.productname like '%%%s%%' " %(productcode,productname)
     
     
      以百分号"%"作为分割符

你可能感兴趣的:(sql,编程,python,django)