C:\Users\User>py
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> text = '123'
>>> print('hello') if command in text for command in ["привет", "хай"]
File "<stdin>", line 1
print('hello') if command in text for command in ["привет", "хай"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: expected 'else' after 'if' expression
>>> print('hello') if command in text else pass for command in ["привет", "хай"]
File "<stdin>", line 1
print('hello') if command in text else pass for command in ["привет", "хай"]
^^^^
SyntaxError: invalid syntax
>>> print('hello') if command in text else ... for command in ["привет", "хай"]
File "<stdin>", line 1
print('hello') if command in text else ... for command in ["привет", "хай"]
^^^
SyntaxError: invalid syntax
>>> print('hello') if command in text else print('',end='') for command in ["привет", "хай"]
File "<stdin>", line 1
print('hello') if command in text else print('',end='') for command in ["привет", "хай"]
^^^
SyntaxError: invalid syntax
>>> command print('hello') if command in text else print('',end='') for command in ["привет", "хай"]
File "<stdin>", line 1
command print('hello') if command in text else print('',end='') for command in ["привет", "хай"]
^^^^^
SyntaxError: invalid syntax
>>> print('hello') if command in text else print('',end='') command for command in ["привет", "хай"]
File "<stdin>", line 1
print('hello') if command in text else print('',end='') command for command in ["привет", "хай"]
^^^^^^^
SyntaxError: invalid syntax
>>> print('hello') if command in text else print('',end='') for command in ["привет", "хай"]
File "<stdin>", line 1
print('hello') if command in text else print('',end='') for command in ["привет", "хай"]
^^^
SyntaxError: invalid syntax