标签: python string python-3.x
if(msg.topic == "abc" & msg.payload == b'1'): print("Loop entered") TypeEror: unsupported operand types for &: 'str' and 'bytes'
答案 0 :(得分:0)
and是我们在Python中编写连词的方式,所以:
and
if msg.topic == "abc" and msg.payload == b'1':