S
S
szjyakgf2021-12-29 14:51:19
Python
szjyakgf, 2021-12-29 14:51:19

How to pass multiple values ​​to message.text.lower()?

if message.text.lower() == 'UAH':
I need to add hryvnia
if message.text.lower() == 'UAH', 'UAH', : Doesn't work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
ab1, 2021-12-29
@szjyakgf

if any(c == message.text.lower() for c in ['UAH', 'UAH']):
print(f"{message.text.lower()}")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question