I am able to read message from Pub nub
but I only want "Yes" or "No". I am getting {u'text':'Yes'}
and {u'text':'No'}
. How to avoid extra things?
Here is my code:
while True:
result = my_listener.wait_for_message_on(channel)
print(result.message)
while True:
result = my_listener.wait_for_message_on(channel)
print(result.message.get('text'))