字符串函数pos(str1,str2)是返回字符串str2在str1中的第一个位置,那么在这句
命令里,为什么要这样呀?
ls_input="pos(log_date,"+ls_input+")>0"
dw_1.setfilter(ls_input)
dw_1.filter()
中"+ls_input+"为什么要这样写呀?
你可以debug一下,如果不加第二层引号的话语法是不对的
字符串连接用+,""中间必须用,
如果ls_input=23
"pos(log_date,"+ls_input+")>0"相当于
pos(log_date,23)>0
ls_input="pos(log_date,"+ls_input+")>0"
"pos(log_date,"
ls_input
")>0"