2

I am creating a bot using Amazon Lex. Currently I am stuck in how to get new line character. My message should look like this:

hello my name is X. #New-line
How can I help you?

But currently I am getting this:

hello my name is X. How can I help you?

I have already tried the following thing but it's not working:

import os
message='hello my name is X. \n How can I help you?'
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Prashant
  • 43
  • 3
  • See if my answer here helps: https://stackoverflow.com/questions/53633654/aws-lex-lambda-return-multiple-lines-with-python/53755169#53755169 – Jay A. Little Jun 10 '20 at 11:22
  • Thank You for the response. Your explanation helped me a lot. – Prashant Jul 08 '20 at 03:42
  • Does this answer your question? [AWS Lex Lambda return multiple lines with Python](https://stackoverflow.com/questions/53633654/aws-lex-lambda-return-multiple-lines-with-python) – Jay A. Little Jul 08 '20 at 04:19
  • @JayA.Little Yes, this answers my question. When I integrate my bot with Facebook page, the new line character \n is working perfectly fine. – Prashant Jul 08 '20 at 15:57
  • Glad that helped. Sorry my second message with the same link was automaticly posted for me when I flagged the question as having already been answered at the link. That way, others know where to look for the answer instead of copying the answer here. – Jay A. Little Jul 09 '20 at 06:26

0 Answers0