Message from Python discussions

December 2018

— This is a simple chat Bot with sets of instructions

— 

Okay... a simple bot with instructions. You already have an idea of what will your bot do, you already know how will you integrate it with whatsapp. Again, what's your question?

— Some chat with *dialogflow

— If i have this

>> my_lists
['list']
[]
['list too']


HO DO I REMOVE THAT EMPTY LIST ?

— Some chat with api.ai

AI - stans for Artificial Intelligence

— Legendary.

— An empty list in boolean context is False

— You can sure use that to your advantage, depending on what you're trying to do.

— So

if list == True:
res = my_lists
else:
pass
print (res)

— Recipe for false positives

— [z for z in my_lists if z != []]

like that ?

— 

if list1:
print(list1)