How can i use python lower command

Hello, this is a general Python question unrelated to Rasa. I’d suggest using Stack Overflow for that :slight_smile:

But, here’s your answer: Simply use .lower() with parenthesis since it is a method, not a property.

While that is true for text processing, this is regular Python code inside a Custom Action. The == operator considers if a letter is lowercase or uppercase.

Even in the case that tracker.get_slot() always returns a lowercase string, it is best practice to use .lower() (or .upper(), .title(), etc.) on both sides of the operator: x.lower() == y.lower() - Unless the case is important of course :slight_smile:

But maybe country.lower() == "america".lower() is too much :joy: