In Intellij Idea, there is Python Console and it works fine with one-line commands.
I tried to enter a two liner by pressing Shift + Enter at the end of the first line which is a common shortcut in chats, for example, and added a second line. Now, the console looks like this and I don't know how to execute the statements I entered:
>>> for item in l:
... print(item)
When I press Enter or Shift + Enter it just adds another line:
>>> for item in l:
... print(item)
...