How to write a multi line python code in the terminal

I started practicing python scripts using itversity terminal. I could do fine with single line scripts or functions. But, I find it difficult to run multi line programs and execute them. Anyone help me how to write a script with 8-10 lines.

You can use continuation character \ to split a statement into multiple lines