In IDLE, say i want to write the following in TWO lines:
x = 3 print x**5
but when i type x = 3 and press enter, it executes the assignment. H
Use the Ctrl-J key sequence instead of the Enter key to get a plain newline plus indentation without having IDLE start interpreting your code.
You can find other key sequences that make IDLE easier to use for this type of learning under the Options->Configure IDLE menu.
Options->Configure