send_id = cur.fetchall()
print send_id
check_id = '(%sL)' % last_id
print check_id
if check_id in send_id:
print 'success'
else:
print 'fair'
运行结果:
((7131L,),)
(7131L)
fair
比较迷惑啊。我怎么改格式都是fair。
send_id = cur.fetchall()
print send_id
check_id = '(%sL)' % last_id
print check_id
if check_id in send_id:
print 'success'
else:
print 'fair'
运行结果:
((7131L,),)
(7131L)
fair
比较迷惑啊。我怎么改格式都是fair。
2 回答5.1k 阅读✓ 已解决
2 回答1.1k 阅读✓ 已解决
4 回答1.5k 阅读✓ 已解决
4 回答1.4k 阅读✓ 已解决
3 回答1.3k 阅读✓ 已解决
8 回答1.3k 阅读
3 回答1.2k 阅读✓ 已解决
check_id 是一个字符串 send_id 里面存的是元组
in判断当然会失败