Dec-01-2020, 09:21 PM
(This post was last modified: Dec-01-2020, 09:22 PM by matt_the_hall.)
@bowlofred, Thanks so much, that did get me closer to what I am aiming for. I am, however, trying to get a final output that is all one string, like this: Ok, I'll remind you in 4 days. I haven't set up the regular expression to take # day(s), yet; I am just using 'day' for simplicity's sake.
In any case, perhaps you can help me understand the output I am getting, now. Below is the raw output in the terminal (using print functions to try and help me understand what my code is doing):
In any case, perhaps you can help me understand the output I am getting, now. Below is the raw output in the terminal (using print functions to try and help me understand what my code is doing):
Error:INFO:root:starting message handling...
INFO:root:waiting for next message
day
['day']
Ok, I'll remind you in
INFO:root:waiting for next message
And here's the updated code:y = "Ok, I'll remind you in " x = str(match[0]) print(x) print(match) y.join(x) print(y) bot_handler.send_reply(message, y)So, I'm a little confused why y.join(x) is not tacking 'day' onto the end of 'Ok, I'll remind you in '. Am I correct in understanding that x = str(match[0]) converts the 0th element of the list match to a string object equal to x? if so, why do I get 'Ok, I'll remind you in ' for print(y)?